192 lines
9.4 KiB
PHP
192 lines
9.4 KiB
PHP
<div class="row">
|
|
{{-- PICTURE --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.picture')) }}</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' => 'testimonialPictureAlt',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.attribute_alt')),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.custom.picture'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.testimonial'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'picture_alt',
|
|
'required' => true,
|
|
'model' => $testimonialModel ?? 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'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.testimonial'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PICTURE_TITLE --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'testimonialPictureTitle',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.attribute_title')),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.custom.picture'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.testimonial'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'picture_title',
|
|
'required' => true,
|
|
'model' => $testimonialModel ?? 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'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.testimonial'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PICTURE --}}
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar-picture', [
|
|
'id' => 'testimonialPicture',
|
|
'name' => 'picture',
|
|
'width' => 292,
|
|
'height' => 417,
|
|
'model' => $testimonialModel ?? null,
|
|
'helper' => __('crud.minicrud.dimensions_must_be', [
|
|
'widthpx' => '292px',
|
|
'heightpx' => '417px',
|
|
]),
|
|
'required' => true,
|
|
'preview' => true,
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- DESCRIPTION --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.attributes.description')) }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'testimonialDescription',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.description')),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.testimonial'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'description',
|
|
'required' => true,
|
|
'model' => $testimonialModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.attributes.description'),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.testimonial'),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __('crud.placeholders.beautiful', ['field' => __('validation.attributes.description')]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- JOB --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.job')) }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'testimonialJob',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.job')),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.testimonial'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'job',
|
|
'required' => true,
|
|
'model' => $testimonialModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.job'),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.testimonial'),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __('crud.placeholders.beautiful', ['field' => __('validation.custom.job')]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- STATUT --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.statut')) }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'testimonialStatut',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.statut')),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.testimonial'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'statut',
|
|
'required' => true,
|
|
'model' => $testimonialModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.statut'),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.testimonial'),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __('crud.placeholders.beautiful', ['field' => __('validation.custom.statut')]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col text-center">
|
|
<p><b>* {{ __('crud.helpers.required_fields') }}</b></p>
|
|
</div>
|
|
</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
|