Viewing file: 43e87ca157bcaee79ce19c5ba6df3331d6f5e89f.php (4.17 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title','Customers'); ?>
<?php $__env->startSection('extra-css'); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-12 mx-auto col-sm-10 mt-3">
<div class="card">
<div class="card-header">
<h2 class="card-title"><?php echo app('translator')->get('admin.customers.title'); ?></h2>
<a class="btn btn-info float-right" href="<?php echo e(route('admin.customers.index')); ?>"><?php echo app('translator')->get('admin.form.button.back'); ?></a>
</div>
<!-- /.card-header -->
<!-- form start -->
<form method="post" role="form" id="customerForm" action="<?php echo e(route('admin.customers.store')); ?>">
<?php echo csrf_field(); ?>
<div class="card-body">
<?php echo $__env->make('admin.customers.form', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
<!-- /.card-body -->
<div class="card-footer">
<button type="submit" class="btn btn-primary"><?php echo app('translator')->get('admin.form.button.submit'); ?></button>
</div>
</form>
</div>
</div>
<!-- /.card -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('extra-scripts'); ?>
<script src="<?php echo e(asset('plugins/jquery-validation/jquery.validate.min.js')); ?>"></script>
<script !src="">
"use strict";
$('#customerForm').validate({
rules: {
email: {
required: true,
email: true,
},
password: {
required: true,
minlength: 5
},
first_name: {
required: true
},
last_name: {
required: true
},
},
messages: {
email: {
required: "Please enter a email address",
email: "Please enter a vaild email address"
},
password: {
required: "Please provide a password",
minlength: "Your password must be at least 5 characters long"
},
first_name: { required:"Please provide first name"},
last_name: { required:"Please provide last name"}
},
errorElement: 'span',
errorPlacement: function (error, element) {
error.addClass('invalid-feedback');
element.closest('.form-group').append(error);
},
highlight: function (element, errorClass, validClass) {
$(element).addClass('is-invalid');
},
unhighlight: function (element, errorClass, validClass) {
$(element).removeClass('is-invalid');
}
});
$(document).on('change', "select[name=type]", function(e){
const type = $(this).val();
if(type == 'normal'){
$('.customer_gateway').addClass('d-none');
}else{
$('.customer_gateway').removeClass('d-none');
}
});
$(document).ready(function() {
$('#gateway').select2();
placeholder:'Select an gateway'
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\actiontexts\resources\views/admin/customers/create.blade.php ENDPATH**/ ?>
|