Viewing file: 707615036ce41cc3c7eba189edb3c46c.php (4.47 KB) -rwxrwxrwx Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title', trans('customer.section_dynamic_template',['index'=>'Create'])); ?>
<?php $__env->startSection('extra-css'); ?> <link rel="stylesheet" href="<?php echo e(asset('plugins/select2/css/select2.min.css')); ?>"> <style> .select2-container--default .select2-selection--single { min-height: 38px; border-radius: 4px 0 0 4px; } </style> <?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('customer.new_template'); ?></h2> <a class="btn btn-info float-right" href="<?php echo e(route('customer.dynamic-template.index')); ?>"><?php echo app('translator')->get('customer.back'); ?></a> </div> <!-- /.card-header --> <!-- form start --> <form method="post" role="form" id="templateForm" action="<?php echo e(route('customer.dynamic-template.store')); ?>"> <?php echo csrf_field(); ?> <div class="card-body"> <?php echo $__env->make('customer.dynamic_template.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('customer.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="<?php echo e(asset('plugins/select2/js/select2.full.min.js')); ?>"></script> <script !src=""> "use strict"; $.validator.addMethod("phone_number", function(value, element) { return new RegExp(/^[0-9\-\+]{9,15}$/).test(value); }, 'Invalid phone number');
$('#templateForm').validate({ rules: { number: { required: true, phone_number:true } }, messages: {
}, 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'); } }); let counter=0; $(document).on('click', '#add_more', function(e){ counter++; let html='';
html=`<div class="row mt-2" id="field_row_${counter}"> <div class="col-md-11 col-11"> <label for="">Field</label> <input type="text" name="inputes[]" class="form-control" placeholder="Enter Field Name"> </div> <div class="col-md-1 col-1 pt-3"> <button class="btn btn-sm btn-danger mt-3 delete_field" data-id="${counter}" type="button"> <i class="fa fa-trash"></i> </button> </div> </div>`;
$('#append_fields').append(html); });
$(document).on('click', '.delete_field', function(e){ const id =$(this).attr('data-id'); $('#field_row_'+id).remove(); })
</script> <?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.customer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/picotech/domains/test.sms.picotech.app/public_html/resources/views/customer/dynamic_template/create.blade.php ENDPATH**/ ?>
|