]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6964 @21
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 27 Jun 2024 13:35:28 +0000 (15:35 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 27 Jun 2024 13:35:28 +0000 (15:35 +0200)
app/SubForms/Webflow/SEOPage.php

index 581485127633e93287f5c9f12f304bc0a40079eb..67ecfd527d4ac8d2cf7ca7b59ff1f7e0a287270a 100644 (file)
@@ -17,14 +17,14 @@ class SEOPage extends SubForm
         $this->addField('id', HiddenVisible::class, __('#'));
         $this->addField('url', HiddenVisible::class, __('URL'));
         $this->addField('type', HiddenVisible::class, __('Type'));
-        $this->addField('draft', Checkbox::class, __('Brouillon'));
+        $this->addField('draft', Checkbox::class, __('Brouillon'), ['when' => ['type' => ['operator' => 'not', 'value' => 'page_html']]]);
         $this->addField('slug', Text::class, __('Slug') . ' (' . __('slug') . ')', ['when' => ['url' => ['operator' => '!', 'value' => '/index.html']]]);
-        $this->addField('seo_title', Text::class, __('Titre'), ['when' => ['type' => 'page']]);
-        $this->addField('og_title_copied', Checkbox::class, __('Utiliser le titre ci-dessus pour les réseaux sociaux'), ['when' => ['type' => 'page']]);
-        $this->addField('og_title', Text::class, __('Titre pour les réseaux sociaux'), ['when' => ['og_title_copied' => '0', 'type' => 'page']]);
-        $this->addField('seo_description', Textarea::class, __('Description'), ['rows' => 2, 'when' => ['type' => 'page']]);
-        $this->addField('og_description_copied', Checkbox::class, __('Utiliser la description ci-dessus pour les réseaux sociaux'), ['when' => ['type' => 'page']]);
-        $this->addField('og_description', Textarea::class, __('Description pour les réseaux sociaux'), ['rows' => 2, 'when' => ['og_description_copied' => '0', 'type' => 'page']]);
+        $this->addField('seo_title', Text::class, __('Titre'), ['when' => ['type' => ['page', 'page_html']]]);
+        $this->addField('og_title_copied', Checkbox::class, __('Utiliser le titre ci-dessus pour les réseaux sociaux'), ['when' => ['type' => ['page_html', 'page']]]);
+        $this->addField('og_title', Text::class, __('Titre pour les réseaux sociaux'), ['when' => ['og_title_copied' => '0', 'type' => ['page_html', 'page']]]);
+        $this->addField('seo_description', Textarea::class, __('Description'), ['rows' => 2, 'when' => ['type' => ['page_html', 'page']]]);
+        $this->addField('og_description_copied', Checkbox::class, __('Utiliser la description ci-dessus pour les réseaux sociaux'), ['when' => ['type' => ['page_html', 'page']]]);
+        $this->addField('og_description', Textarea::class, __('Description pour les réseaux sociaux'), ['rows' => 2, 'when' => ['og_description_copied' => '0', 'type' => ['page_html', 'page']]]);
 
     }
 }