Viewing file: bae2707e0b31f841e154adaa0b0740ad7f0d4d5c.php (4.72 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title',trans('layout.item_edit')); ?>
<?php $__env->startSection('css'); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('main-content'); ?>
<div class="row page-titles mx-0">
<div class="col-sm-6 p-md-0">
<div class="welcome-text">
<h4><?php echo e(trans('layout.item')); ?></h4>
<p class="mb-0"><?php echo e(trans('layout.item_edit')); ?></p>
</div>
</div>
<div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0)"><?php echo e(trans('layout.home')); ?></a></li>
<li class="breadcrumb-item"><a href="<?php echo e(route('item.index')); ?>"><?php echo e(trans('layout.item')); ?></a></li>
<li class="breadcrumb-item active"><a href="javascript:void(0)"><?php echo e(trans('layout.edit')); ?></a></li>
</ol>
</div>
</div>
<!-- row -->
<div class="row">
<div class="col-xl-12 col-xxl-12">
<div class="card">
<div class="card-header">
<h4 class="card-title"><?php echo e(trans('layout.edit')); ?></h4>
</div>
<div class="card-body">
<form action="<?php echo e(route('item.update',$item)); ?>" method="post" id="step-form-horizontal"
class="step-form-horizontal" enctype="multipart/form-data">
<?php echo method_field('put'); ?>
<?php echo $__env->make('item.form', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<div class="pull-right">
<button class="btn btn-primary btn-sm" type="submit"><?php echo e(trans('layout.submit')); ?></button>
</div>
</form>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
<script>
let extraCount=<?php echo e($item->extras()->count()); ?>;
$(document).on('click','.add_extra',function(e){
e.preventDefault();
const html=`<div class="row" id="extraSection${extraCount}">
<div class="col-lg-4 mb-2">
<div class="form-group row">
<div class="col-sm-12">
<input name="extra_title[]" type="text" class="form-control" placeholder="<?php echo e(trans('layout.add_extra_name')); ?>">
</div>
</div>
</div>
<div class="col-lg-4 mb-2">
<div class="form-group row">
<div class="col-sm-12">
<input name="extra_price[]" step="0.0001" type="number" min="0" class="form-control" placeholder="<?php echo e(trans('layout.enter_price')); ?>">
</div>
</div>
</div>
<div class="col-lg-2 mb-2">
<div class="form-group row">
<div class="col-sm-12">
<select name="extra_status[]" class="form-control">
<option value="active"><?php echo e(trans('layout.active')); ?></option>
<option value="inactive"><?php echo e(trans('layout.inactive')); ?></option>
</select>
</div>
</div>
</div>
<div class="col-lg-2 mb-2">
<div class="form-group row mt-2">
<button data-section=${extraCount} type="button" class="btn btn-xs btn-danger delete-extra"><i class="la la-trash"></i></button>
</div>
</div>
</div>`;
$('#extraItemAddSection').append(html);
extraCount++;
});
$(document).on('click','.delete-extra',function(e){
e.preventDefault();
const sectionId=$(this).attr('data-section');
$('#extraSection'+sectionId).remove();
})
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/picotech/domains/qr.picotech.app/public_html/resources/views/item/edit.blade.php ENDPATH**/ ?>
|