From ba040bf219d6204b389dc901c0a12d6be895e654 Mon Sep 17 00:00:00 2001 From: Abdel LAMRANI Date: Fri, 3 Jul 2026 09:59:48 +0200 Subject: [PATCH] fix :bug: last reviews for redirection block --- app/Enums/BlockTypeEnum.php | 7 -- .../blocks/redirection-block-form.blade.php | 68 +++++++------------ .../partials/block/reduction-card.blade.php | 46 +++++++------ 3 files changed, 48 insertions(+), 73 deletions(-) diff --git a/app/Enums/BlockTypeEnum.php b/app/Enums/BlockTypeEnum.php index 4c416250..509374eb 100644 --- a/app/Enums/BlockTypeEnum.php +++ b/app/Enums/BlockTypeEnum.php @@ -32,13 +32,6 @@ enum BlockTypeEnum: int self::redirection => [ 'type' => self::redirection, 'data' => [ - 'title' => [ - 'label' => 'Titre', - 'inputType' => InputType::string->value, - 'value' => 'Redirections actualités', - 'validate' => 'nullable|string|between:3,255', - 'required' => false, - ], 'position' => [ 'label' => 'Position', 'inputType' => InputType::selectEnum->value, diff --git a/resources/views/bo/partials/blocks/redirection-block-form.blade.php b/resources/views/bo/partials/blocks/redirection-block-form.blade.php index 69667ec6..0d491789 100644 --- a/resources/views/bo/partials/blocks/redirection-block-form.blade.php +++ b/resources/views/bo/partials/blocks/redirection-block-form.blade.php @@ -1,53 +1,31 @@ @php - use \App\Enums\Block\BlockPositionEnum; - use \App\Enums\Block\BlockContentTypeEnum; + use App\Enums\Block\BlockPositionEnum; + use App\Enums\Block\BlockContentTypeEnum; @endphp -{{-- Titre --}} -
-
-
- {{ __('Titre') }} - @include('bo.partials.inputs.varchar', [ - 'id' => $idPrefix . '-title', - 'label' => __('Titre'), - 'hasWordCounter' => true, - 'name' => 'data[title][value]', - 'value' => old('data.title.value', $data['title']['value'] ?? null), - 'required' => false, - 'model' => $model ?? null, - 'helper' => __('validation.between.string', [ - 'attribute' => __('Titre'), - 'min' => 3, - 'max' => 150, - ]), - ]) - @include('modules.input-error', ['inputName' => 'data.title.value']) -
-
-
-
- {{ __('Afficher bloc') }} * -
-
- +{{-- Visibility --}} +
+
+ {{ __('Afficher bloc') }} * +
+
+ -
- -
- - @include('modules.input-error', [ - 'inputName' => 'data.visibility.value', - 'helperId' => 'visibilityHelp', - 'helper' => __('crud.minicrud.visibility_helper'), - ]) +
+
+ + @include('modules.input-error', [ + 'inputName' => 'data.visibility.value', + 'helperId' => 'visibilityHelp', + 'helper' => __('crud.minicrud.visibility_helper'), + ])
-
-
+
+
{{-- Position --}}
@@ -144,7 +122,7 @@ 'relation' => null, 'model' => $model ?? null, 'targetClass' => '\App\Models\News', - 'modelListPaginate' => \App\Models\News::where('published',1)->paginate(10), + 'modelListPaginate' => \App\Models\News::where('published', 1)->paginate(10), 'routeName' => 'bo.news.json-paginate', 'fieldName' => 'title', 'multiple' => false, diff --git a/resources/views/fo/partials/block/reduction-card.blade.php b/resources/views/fo/partials/block/reduction-card.blade.php index 06e61a63..358bde2b 100644 --- a/resources/views/fo/partials/block/reduction-card.blade.php +++ b/resources/views/fo/partials/block/reduction-card.blade.php @@ -8,33 +8,37 @@