78 lines
3.4 KiB
PHP
78 lines
3.4 KiB
PHP
<div class="row">
|
|
{{-- NAME --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="border h-100 bg-white p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.attributes.name')) }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'packageName',
|
|
'label' => __(':field du :model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.name')),
|
|
'model' => Str::singular(__('models.classes.packages')),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'name',
|
|
'required' => true,
|
|
'model' => $packageModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field du :model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.name')),
|
|
'model' => Str::singular(__('models.classes.packages')),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255
|
|
]),
|
|
'placeholder' => __(':field du :model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.name')),
|
|
'model' => Str::singular(__('models.classes.packages')),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- AMOUNT --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="border h-100 bg-white p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.attributes.amount.day')) }}</legend>
|
|
<div class="row">
|
|
<div class="col-12 mb-3">
|
|
@include('bo.partials.inputs.int-number', [
|
|
'id' => 'packageAmount',
|
|
'label' => __(':field du :model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.amount.day')),
|
|
'model' => Str::singular(__('models.classes.packages')),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'amount',
|
|
'required' => true,
|
|
'model' => $packageModel ?? null,
|
|
'helper' => __('validation.min.numeric', [
|
|
'attribute' => __(':field du :model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.amount.day')),
|
|
'model' => Str::singular(__('models.classes.packages')),
|
|
]),
|
|
'min' => 0,
|
|
]),
|
|
'step' => 0.01
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
@push('scripts')
|
|
<script nonce="{{ $nonce }}">
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
// Submit button clone.
|
|
const submit = document.getElementById('formSubmit')
|
|
submitClone = document.getElementById('formSubmitClone');
|
|
submitClone.addEventListener('click', (event) => {
|
|
event.preventDefault();
|
|
submit.click('');
|
|
})
|
|
});
|
|
</script>
|
|
@endpush
|