Файловый менеджер - Редактировать - /home/clickysoft/public_html/securebeans.clickysoft.net/storage/framework/views/7d45724055d3fc4fb8ccc464edf949e10421a0ee.php
Назад
<?php $__env->startSection('styles'); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <div class="content"> <?php if(\Session::has('success')): ?> <p class="alert alert-success"> <?php echo \Session::get('success'); ?> </p> <?php endif; ?> <?php if(\Session::has('error')): ?> <p class="alert alert-danger"> <?php echo \Session::get('error'); ?> </p> <?php endif; ?> <form method="POST" action="<?php echo e(route('admin.license.store')); ?>" enctype="multipart/form-data" class="from-prevent-multiple-submits"> <?php echo csrf_field(); ?> <div class="card"> <div class="card-header ui-sortable-handle"> <div class="row"> <h5 class="ml-2">Create License</h5> <ul class="nav nav-pills ml-auto"> <li class="nav-item"> <button class="btn btn-success from-prevent-multiple-submits" type="submit">Submit</button> </li> <li class="nav-item ml-2"> <button type="button" onclick="window.location.href='<?php echo e(route('admin.license.index')); ?>'" class="btn btn-warning text-white">Cancel</button> </li> </ul> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-body"> <div class="row"> <div class="col-sm-12"> <div class="card"> <div class="card-body"> <div class="row"> <div class="col-sm-3"> <div class="form-group <?php echo e($errors->has('customer_id') ? 'has-error' : ''); ?>"> <label class="required" for="customer_id">Customer Name</label> <div style="padding-bottom: 4px"> </div> <select class="form-control select2" name="customer_id" id="customer_id"> <option value="">Select</option> <?php $__currentLoopData = $customers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $customer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($customer->id); ?>" <?php echo e(old('customer_id') == $customer->id ? 'selected' : ''); ?>> <?php echo e($customer->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php if($errors->has('customer_id')): ?> <span class="help-block" role="alert">The customer name field is required.</span> <?php endif; ?> <span class="help-block"><?php echo e(trans('cruds.user.fields.roles_helper')); ?></span> </div> </div> <div class="col-sm-3"> <div class="form-group <?php echo e($errors->has('contract_number') ? 'has-error' : ''); ?>"> <label class="required" for="name">Contract Number</label> <input autocomplete="off" class="form-control" type="text" name="contract_number" id="contract_number" value="<?php echo e(old('contract_number', '')); ?>"> <?php if($errors->has('contract_number')): ?> <span class="help-block" role="alert"><?php echo e($errors->first('contract_number')); ?></span> <?php endif; ?> <span class="help-block"><?php echo e(trans('cruds.user.fields.name_helper')); ?></span> </div> </div> <div class="col-sm-3"> <div class="form-group <?php echo e($errors->has('support_site_id') ? 'has-error' : ''); ?>"> <label class="required" for="name">Support Site Id</label> <input class="form-control" type="text" name="support_site_id" id="support_site_id" value="<?php echo e(old('support_site_id', '')); ?>"> <?php if($errors->has('support_site_id')): ?> <span class="help-block" role="alert"><?php echo e($errors->first('support_site_id')); ?></span> <?php endif; ?> <span class="help-block"><?php echo e(trans('cruds.user.fields.name_helper')); ?></span> </div> </div> <div class="col-sm-3"> <div class=""> <label>Upload File</label> <input class="" type="file" name="file" value="<?php echo e(old('file', '')); ?>" id="file" accept=".jpg, .jpeg, .png,.pdf"> <?php if($errors->has('file')): ?> <span class="help-block" role="alert" style="color: red"> <?php echo e($errors->first('file')); ?></span> <?php endif; ?> <span class="help-block"><?php echo e(trans('cruds.user.fields.name_helper')); ?></span> </div> </div> </div> <div class="row"> <div class="col-sm-6 col-md-6 form-group <?php echo e($errors->has('reseller2') ? 'has-error' : ''); ?>"> <label for="reseller2">Reseller 2</label> <select class="form-control select2 product" name="reseller2" id="reseller2"> <?php $__currentLoopData = $resellers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $reseller): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($reseller->id); ?>" <?php echo e(old('reseller2') == $reseller->id ? 'selected' : ''); ?>> <?php echo e($reseller->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php if($errors->has('reseller2')): ?> <span class="help-block" role="alert"><?php echo e($errors->first('reseller2')); ?></span> <?php endif; ?> </div> <div class="col-sm-6 col-md-6 form-group <?php echo e($errors->has('reseller1') ? 'has-error' : ''); ?>"> <label for="reseller1">Reseller 1</label> <select class="form-control select2 product" name="reseller1" id="reseller1"> <?php $__currentLoopData = $resellers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $reseller): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($reseller->id); ?>" <?php echo e(old('reseller1') == $reseller->id ? 'selected' : ''); ?>> <?php echo e($reseller->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php if($errors->has('reseller1')): ?> <span class="help-block" role="alert"><?php echo e($errors->first('reseller1')); ?></span> <?php endif; ?> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="col-sm-12"> <div class="card"> <div class="card-body another" id="parent-div"> <?php for($key = 0; $key < count(old('product_id', $licenseProducts)); $key++): ?> <div class="row selector" id="child-div<?php echo e($key); ?>"> <div class="col-sm-3"> <div class="form-group <?php echo e($errors->has('product_id.' . $key) ? 'has-error' : ''); ?>"> <label class="required" for="product_id<?php echo e($key); ?>">Product SKU</label> <select class="form-control select2 product" name="product_id[]" id="product_id<?php echo e($key); ?>"> <option value="">Select</option> <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($product['id']); ?>" <?php echo e(old('product_id.' . $key) == $product['id'] ? 'selected' : ''); ?>> <?php echo e($product['product_sku']); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php if($errors->has('product_id.' . $key)): ?> <span class="help-block" role="alert"><?php echo e($errors->first('product_id.' . $key)); ?>.</span> <?php endif; ?> <span class="help-block"><?php echo e(trans('cruds.user.fields.roles_helper')); ?></span> </div> </div> <div class="col-sm-2"> <div class="form-group <?php echo e($errors->has('start_date.' . $key) ? 'has-error' : ''); ?>"> <label class="required" for="start_date">Start Date</label> <input class="form-control dat" id="start-date" type="text" autocomplete="off" name="start_date[]" placeholder="dd-mm-yyyy" id="start_date" value="<?php echo e(old('start_date.' . $key)); ?>"> <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span> <?php if($errors->has('start_date.' . $key)): ?> <span class="help-block" role="alert"><?php echo e($errors->first('start_date.' . $key)); ?></span> <?php endif; ?> <span class="help-block"><?php echo e(trans('cruds.user.fields.name_helper')); ?></span> </div> </div> <div class="col-sm-2"> <div class="form-group <?php echo e($errors->has('end_date.' . $key) ? 'has-error' : ''); ?>"> <label class="required" for="end_date">End Date</label> <input class="form-control dat" type="text" name="end_date[]" placeholder="dd-mm-yyyy" autocomplete="off" id="end_date" value="<?php echo e(old('end_date.' . $key, '')); ?>"> <?php if($errors->has('end_date.' . $key)): ?> <span class="help-block" role="alert"><?php echo e($errors->first('end_date.' . $key)); ?></span> <?php endif; ?> <span class="help-block"><?php echo e(trans('cruds.user.fields.name_helper')); ?></span> </div> </div> <div class="col-sm-3"> <div class="form-group <?php echo e($errors->has('quantity.' . $key) ? 'has-error' : ''); ?>"> <label class="required" for="quantity<?php echo e($key); ?>">Quantity</label><br> <input type="button" onclick="decrementValue('quantity<?php echo e($key); ?>')" value="-" class="inc-dec" /> <input type="text" name="quantity[]" value="<?php echo e(old('quantity.' . $key, 0)); ?>" maxlength="5" max="10000" id="quantity<?php echo e($key); ?>" class="quantity" /> <input type="button" onclick="incrementValue('quantity<?php echo e($key); ?>')" value="+" class="inc-dec" /> <?php if($errors->has('quantity.' . $key)): ?> <span class="help-block" role="alert"><?php echo e($errors->first('quantity.' . $key)); ?></span> <?php endif; ?> </div> </div> <div class="col-sm-2"> <?php if($key != 0): ?> <a href="" class="btn btn-danger btn-sm mt-4 remove-btn" id="<?php echo e($key); ?>">remove</a> <?php endif; ?> </div> </div> <?php endfor; ?> </div> <div class="row add-more"> <div class="col-sm-2 mt-2 mb-2 p-0"> <a class="btn btn-primary " href="" id="add-more">Add More</a> </div> </div> </div> </div> </div> <input name="row-counter" value="<?php echo e(old('row-counter', '1')); ?>" id="row-counter" type="hidden" /> </form> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('scripts'); ?> <script> $(document).ready(function(){ $('.from-prevent-multiple-submits').on('submit', function() { $('.from-prevent-multiple-submits').attr('disabled', 'true'); }); }); var license_id = ''; $('.dat').datepicker({ format: "d-M-yyyy", }); // var count=<?php echo e(count($licenseProducts)); ?>; var count = 1; var products = <?php echo json_encode($products); ?>; $(document).on('click', '#add-more', function(e) { count++; e.preventDefault(); var newRow = '<div class="row selector" id="child-div' + count + '" data-attr="1"><div class="col-sm-3"><div class="form-group first-form-g"><label class="required" for="product_id' + count + '">Product SKU</label><select class="form-control select2 product" name="product_id[]" id="product_id' + count + '"><option value="">Select</option>'; for (i = 0; i < products.length; i++) { newRow += '<option value="' + products[i].id + '">' + products[i].product_sku + '</option>'; } newRow += '</select></div></div><div class="col-sm-2"><div class="form-group"><label class="required" for="start_date' + count + '">Start Date</label><input class="dat form-control" id="start-date" type="text" name="start_date[]" autocomplete="off" placeholder="dd-mm-yyyy" id="start_date" value=""></div></div><div class="col-sm-2"><div class="form-group"><label class="required" for="end_date' + count + '">End Date</label><input class="dat form-control" autocomplete="off" type="text" name="end_date[]" placeholder="dd-mm-yyyy"id="end_date" value=""></div></div><div class="col-sm-3"><div class="form-group"><label class="required" for="quantity' + count + '">Quantity</label><br><input type="button" class="inc-dec" onclick="decrementValue(\'quantity' + count + '\')" value="-" /><input type="text" name="quantity[]" value="0" maxlength="5" max="10000" id="quantity' + count + '" class="quantity"/><input type="button" class="inc-dec" onclick="incrementValue(\'quantity' + count + '\')" value="+" /></div></div><div class="col-sm-2"><a href="" class="btn btn-danger btn-sm mt-4 remove-btn" id=' + count + '>remove</a></div></div>'; $('#parent-div').append(newRow); $('.select2').select2(); $(".dat").datepicker("destroy"); $('.dat').datepicker({ format: "d-M-yyyy", }); $('#row-counter').val(parseInt($('#row-counter').val()) + 1); }); function incrementValue(elementId) { var value = parseInt(document.getElementById(elementId).value); value = isNaN(value) ? 0 : value; ++value; document.getElementById(elementId).value = value; } function decrementValue(elementId) { var value = parseInt(document.getElementById(elementId).value); value = isNaN(value) ? 0 : value; --value; document.getElementById(elementId).value = value; } $(document).on('click', '#save-product', function(e) { e.preventDefault(); if (license_id == '') { alert("Please create license first") } // else{ var start_date = $("input[name='start_date[]']").map(function() { return $(this).val(); }).get(); var end_date = $("input[name='end_date[]']").map(function() { return $(this).val(); }).get(); var quantity = $("input[name='quantity[]']").map(function() { return $(this).val(); }).get(); var product_sku = $("select[name=\'product_id[]\']").map(function() { return $(this).val(); }).get(); console.log(product_sku) $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); $.ajax({ type: "post", url: "", data: { start_date: start_date, end_date: end_date, quantity: quantity, product_sku: product_sku, licernse_id: license_id }, }).done(function(data) { if (data.status) { console.log(data) } }) // } }) $(document).on('click', '.remove-btn', function(e) { e.preventDefault(); var id = $(this).attr("id"); $('#child-div' + id).remove(); count--; // $('#row-counter').val(parseInt($('#row-counter').val())-1); }) </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/clickysoft/public_html/securebeans.clickysoft.net/resources/views/admin/license/create.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка