121 lines
6 KiB
PHP
121 lines
6 KiB
PHP
<div class="row">
|
|
{{-- NAME --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.attributes.name')) }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('back::partials.inputs.varchar', [
|
|
'id' => 'rangeName',
|
|
'label' => __(':field', [
|
|
'field' => Str::ucfirst(__('validation.attributes.name')),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'name',
|
|
'required' => true,
|
|
'model' => $rangeModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field', [
|
|
'field' => Str::ucfirst(__('validation.attributes.name')),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field de la :model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.name')),
|
|
'model' => Str::singular(__('models.classes.range')),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- PICTURE --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="container-fluid border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.attributes.image')) }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- PICTURE_ALT --}}
|
|
<div class="col-12 col-md-6 m-md-0 mb-3">
|
|
@include('back::partials.inputs.varchar', [
|
|
'id' => 'rangePictureAlt',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.attribute_alt')),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.attributes.image'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.range'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'picture_alt',
|
|
'required' => false,
|
|
'model' => $rangeModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_alt_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.attribute_alt')),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.attributes.image'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.range'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PICTURE_TITLE --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
@include('back::.partials.inputs.varchar', [
|
|
'id' => 'rangePictureTitle',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.attribute_title')),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.attributes.image'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.range'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'picture_title',
|
|
'required' => false,
|
|
'model' => $rangeModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_title_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.attribute_title')),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.attributes.image'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.range'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PICTURE --}}
|
|
<div class="col-12">
|
|
@include('back::partials.inputs.varchar-picture', [
|
|
'id' => 'rangePicture',
|
|
'name' => 'picture',
|
|
'width' => config('theme.models.ranges.picture_max_width'),
|
|
'height' => config('theme.models.ranges.picture_max_height'),
|
|
'model' => $rangeModel ?? null,
|
|
'helper' => __('crud.minicrud.dimensions_must_be', [
|
|
'widthpx' => config('theme.models.ranges.picture_max_width') . 'px',
|
|
'heightpx' => config('theme.models.ranges.picture_max_height') . 'px',
|
|
]),
|
|
'required' => false,
|
|
'preview' => true,
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
@push('scripts')
|
|
<script>
|
|
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
|