diff --git a/app/Enums/StaticPageType.php b/app/Enums/StaticPageType.php
index 519fa1d..cb7a035 100644
--- a/app/Enums/StaticPageType.php
+++ b/app/Enums/StaticPageType.php
@@ -52,4 +52,25 @@ enum StaticPageType: int
self::we_listen,
];
}
+
+ /**
+ * Does the static page need to fill its 'content' column ?
+ *
+ * @return boolean
+ */
+ public function containsContent(): bool
+ {
+ return match ($this) {
+ self::contact,
+ self::legals,
+ self::confidentiality => true,
+ self::home,
+ self::unveil,
+ self::we_hire,
+ self::we_commit,
+ self::we_move,
+ self::we_produce,
+ self::we_listen => false,
+ };
+ }
}
diff --git a/resources/views/bo/pages/static_pages/form.blade.php b/resources/views/bo/pages/static_pages/form.blade.php
index 4b3d529..ad37e9e 100644
--- a/resources/views/bo/pages/static_pages/form.blade.php
+++ b/resources/views/bo/pages/static_pages/form.blade.php
@@ -12,7 +12,9 @@
'model' => $staticPageModel ?? null,
'required' => false,
'disabled' => true,
- 'associatedModels' => \App\Enums\StaticPageType::toArray(),
+ 'associatedModels' => Arr::where(
+ \App\Enums\StaticPageType::toArray(),
+ fn(object $type) => $type->value === $staticPageModel->type->value),
'helper' => '',
])
@@ -125,30 +127,32 @@
-
- {{-- CONTENT --}}
-
-