76 lines
3.3 KiB
PHP
76 lines
3.3 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' => 'labelName',
|
|
'label' => __(':field du :model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.name')),
|
|
'model' => Str::singular(__('models.classes.labels'))
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'name',
|
|
'required' => true,
|
|
'model' => $labelModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field du :model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.name')),
|
|
'model' => Str::singular(__('models.classes.labels'))
|
|
]),
|
|
'min' => 2,
|
|
'max' => 255
|
|
]),
|
|
'placeholder' => __(':field du :model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.name')),
|
|
'model' => Str::singular(__('models.classes.labels'))
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- COLOR --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="border h-100 bg-white p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.attributes.color')) }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.int-color', [
|
|
'id' => 'labelColor',
|
|
'label' => __(':field du :model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.color')),
|
|
'model' => Str::singular(__('models.classes.labels'))
|
|
]),
|
|
'name' => 'color',
|
|
'required' => true,
|
|
'model' => $labelModel ?? null,
|
|
'value' => '#FFFFFF',
|
|
'helper' => __('validation.color', [
|
|
'attribute' => __(':field du :model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.color')),
|
|
'model' => Str::singular(__('models.classes.labels'))
|
|
]),
|
|
]),
|
|
])
|
|
</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
|