ldc-agis/resources/views/bo/pages/ranges/form.blade.php
2023-12-19 15:09:12 +00:00

452 lines
23 KiB
PHP

<div class="row">
{{-- SEO --}}
<div class="col-12 pb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.seo')) }}</legend>
<div class="row mb-3">
{{-- SEO_TITLE --}}
<div class="col-12 col-md-6 m-md-0 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => 'rangeSeoTitle',
'label' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.seo_title')),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'hasWordCounter' => true,
'name' => 'seo_title',
'required' => true,
'model' => $rangeModel ?? null,
'helper' => sprintf(
'%s %s',
__('crud.helpers.seo_title'),
__('validation.between.string', [
'attribute' => __(':field :inter:model', [
'field' => __('validation.custom.seo_title'),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'min' => 45,
'max' => 70,
])),
'placeholder' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.seo_title')),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
])
</div>
{{-- SEO_DESCRIPTION --}}
<div class="col-12 col-md-6 m-md-0 mb-3">
@include('bo.partials.inputs.varchar-multiline', [
'id' => 'rangeSeoDescription',
'label' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.seo_description')),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'hasWordCounter' => true,
'name' => 'seo_description',
'required' => true,
'model' => $rangeModel ?? null,
'helper' => sprintf(
'%s %s',
__('crud.helpers.seo_description'),
__('validation.between.string', [
'attribute' => __(':field :inter:model', [
'field' => __('validation.custom.seo_description'),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'min' => 50,
'max' => 160,
])),
'placeholder' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.seo_description')),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
])
</div>
</div>
</fieldset>
</div>
{{-- TITLE --}}
<div class="col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.attributes.title')) }}</legend>
<div class="row">
<div class="col-12">
@include('bo.partials.inputs.varchar', [
'id' => 'rangeTitle',
'label' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.attributes.title')),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'hasWordCounter' => true,
'name' => 'title',
'required' => true,
'model' => $rangeModel ?? null,
'helper' => __('validation.between.string', [
'attribute' => __(':field :inter:model', [
'field' => __('validation.attributes.title'),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'min' => 3,
'max' => 100,
]),
'placeholder' => __('Un titre clair et concis'),
])
</div>
</div>
</fieldset>
</div>
{{-- SUBTITLE --}}
<div class="col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.subtitle')) }}</legend>
<div class="row">
<div class="col-12">
@include('bo.partials.inputs.varchar', [
'id' => 'rangeSubtitle',
'label' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.subtitle')),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'hasWordCounter' => true,
'name' => 'subtitle',
'required' => true,
'model' => $rangeModel ?? null,
'helper' => __('validation.between.string', [
'attribute' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.subtitle')),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'min' => 3,
'max' => 255,
]),
'placeholder' => __('Un sous-titre clair et concis'),
])
</div>
</div>
</fieldset>
</div>
{{-- TAGLINE --}}
<div class="col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.tagline')) }}</legend>
<div class="row">
<div class="col-12">
@include('bo.partials.inputs.varchar', [
'id' => 'rangeTagline',
'label' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.tagline')),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'hasWordCounter' => true,
'name' => 'tagline',
'required' => true,
'model' => $rangeModel ?? null,
'helper' => __('validation.between.string', [
'attribute' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.tagline')),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'min' => 3,
'max' => 255,
]),
'placeholder' => __('Une belle phrase d\'accroche'),
])
</div>
</div>
</fieldset>
</div>
{{-- PUBLISHED --}}
<div class="col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ __('crud.minicrud.visibility_label') }}</legend>
<div class="row">
<div class="col-12">
@include('bo.partials.inputs.tinyint-boolean', [
'id' => 'rangeStatus',
'name' => 'published',
'model' => $rangeModel ?? null,
'label' => __('crud.minicrud.visibility_label'),
'helper' => __('crud.minicrud.visibility_helper'),
])
</div>
</div>
</fieldset>
</div>
{{-- DESCRIPTION --}}
<div class="col-12 mb-3">
<fieldset class="border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.description')) }}</legend>
<div class="row mb-3">
<div class="col-12">
@include('bo.partials.inputs.text-html', [
'id' => 'rangeDescription',
'label' => __(':field :inter:model', [
'field' => Str::ucfirst(__('validation.custom.description')),
'inter' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'name' => 'description',
'model' => $rangeModel ?? null,
'required' => true,
'helper' => __('crud.minicrud.text_warning'),
])
</div>
</div>
</fieldset>
</div>
{{-- PICTURE --}}
<div class="col-12 pb-3">
<fieldset class="h-100 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('bo.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.female'),
'model' => __('models.classes.range'),
]),
'hasWordCounter' => true,
'name' => 'picture_alt',
'required' => true,
'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.female'),
'model' => __('models.classes.range'),
]),
])
</div>
{{-- PICTURE_TITLE --}}
<div class="col-12 col-md-6 mb-3">
@include('bo.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.female'),
'model' => __('models.classes.range'),
]),
'hasWordCounter' => true,
'name' => 'picture_title',
'required' => true,
'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.female'),
'model' => __('models.classes.range'),
]),
])
</div>
{{-- PICTURE --}}
<div class="col-12">
@include('bo.partials.inputs.varchar-picture', [
'id' => 'rangePicture',
'name' => 'picture',
'width' => 466,
'height' => 440,
'model' => $rangeModel ?? null,
'helper' => __('crud.minicrud.dimensions_must_be', [
'widthpx' => '466px',
'heightpx' => '440px',
]),
'required' => true,
'preview' => true,
])
</div>
</div>
</fieldset>
</div>
{{-- PICTURE_PRODUCTSHEET --}}
<div class="col-12 pb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.picture_productsheet')) }}</legend>
<div class="row mb-3">
{{-- PICTURE_PRODUCTSHEET_ALT --}}
<div class="col-12 col-md-6 m-md-0 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => 'rangePictureProductsheetAlt',
'label' => __(':field1 :inter1:field2 :inter2:model', [
'field1' => Str::ucfirst(__('validation.custom.attribute_alt')),
'inter1' => __('validation.custom.of_the.vowel'),
'field2' => __('validation.custom.picture_productsheet'),
'inter2' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'hasWordCounter' => true,
'name' => 'picture_productsheet_alt',
'required' => true,
'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.custom.picture_productsheet'),
'inter2' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
])
</div>
{{-- PICTURE_PRODUCTSHEET_TITLE --}}
<div class="col-12 col-md-6 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => 'rangePictureProductsheetTitle',
'label' => __(':field1 :inter1:field2 :inter2:model', [
'field1' => Str::ucfirst(__('validation.custom.attribute_title')),
'inter1' => __('validation.custom.of_the.vowel'),
'field2' => __('validation.custom.picture_productsheet'),
'inter2' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'hasWordCounter' => true,
'name' => 'picture_productsheet_title',
'required' => true,
'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.custom.picture_productsheet'),
'inter2' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
])
</div>
{{-- PICTURE_PRODUCTSHEET --}}
<div class="col-12">
@include('bo.partials.inputs.varchar-picture', [
'id' => 'rangePictureProductsheet',
'name' => 'picture_productsheet',
'width' => 680,
'height' => 300,
'model' => $rangeModel ?? null,
'helper' => __('crud.minicrud.dimensions_must_be', [
'widthpx' => '680px',
'heightpx' => '300px',
]),
'required' => true,
'preview' => true,
])
</div>
</div>
</fieldset>
</div>
{{-- PICTURE_THUMBNAIL --}}
<div class="col-12 pb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.picture_thumbnail')) }}</legend>
<div class="row mb-3">
{{-- PICTURE_THUMBNAIL_ALT --}}
<div class="col-12 col-md-6 m-md-0 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => 'rangePictureThumbnailAlt',
'label' => __(':field1 :inter1:field2 :inter2:model', [
'field1' => Str::ucfirst(__('validation.custom.attribute_alt')),
'inter1' => __('validation.custom.of_the.female'),
'field2' => __('validation.custom.picture_thumbnail'),
'inter2' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'hasWordCounter' => true,
'name' => 'picture_thumbnail_alt',
'required' => true,
'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.female'),
'field2' => __('validation.custom.picture_thumbnail'),
'inter2' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
])
</div>
{{-- PICTURE_THUMBNAIL_TITLE --}}
<div class="col-12 col-md-6 mb-3">
@include('bo.partials.inputs.varchar', [
'id' => 'rangePictureThumbnailTitle',
'label' => __(':field1 :inter1:field2 :inter2:model', [
'field1' => Str::ucfirst(__('validation.custom.attribute_title')),
'inter1' => __('validation.custom.of_the.female'),
'field2' => __('validation.custom.picture_thumbnail'),
'inter2' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
'hasWordCounter' => true,
'name' => 'picture_thumbnail_title',
'required' => true,
'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.female'),
'field2' => __('validation.custom.picture_thumbnail'),
'inter2' => __('validation.custom.of_the.female'),
'model' => __('models.classes.range'),
]),
])
</div>
{{-- PICTURE_THUMBNAIL --}}
<div class="col-12">
@include('bo.partials.inputs.varchar-picture', [
'id' => 'rangePictureThumbnail',
'name' => 'picture_thumbnail',
'width' => 246,
'height' => 337,
'model' => $rangeModel ?? null,
'helper' => __('crud.minicrud.dimensions_must_be', [
'widthpx' => '246px',
'heightpx' => '337px',
]),
'required' => true,
'preview' => true,
])
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col text-center">
<p><b>{{ __('* Champs obligatoires') }}</b></p>
</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