From: Vincent Vanwaelscappel Date: Mon, 30 May 2022 13:38:39 +0000 (+0200) Subject: wait #5112 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=cac409bffcc0f9f96b5f15b00e278457bd5f9c4e;p=fluidbook-toolbox.git wait #5112 @1 --- diff --git a/app/Jobs/LegacyBookSettingsGenerate.php b/app/Jobs/LegacyBookSettingsGenerate.php index 37f1b78e8..2878e290c 100644 --- a/app/Jobs/LegacyBookSettingsGenerate.php +++ b/app/Jobs/LegacyBookSettingsGenerate.php @@ -4,8 +4,10 @@ namespace App\Jobs; use App\Models\Traits\PublicationSettings; use Cubist\Backpack\Magic\BunchOfFields; +use Cubist\Backpack\Magic\Fields\FormBigSection; use Cubist\Backpack\Magic\Fields\FormSection; use Cubist\Backpack\Magic\Fields\FormSeparator; +use Cubist\Backpack\Magic\Fields\FormSuperSection; use Cubist\Util\PHP; class LegacyBookSettingsGenerate extends Base @@ -22,6 +24,9 @@ class LegacyBookSettingsGenerate extends Base $currentForm = null; foreach ($this->getFields() as $field) { + if($field instanceof FormSuperSection){ + continue; + } if ($field instanceof FormSection) { if (null !== $currentForm) { $key = $currentForm['key']; @@ -48,6 +53,10 @@ class LegacyBookSettingsGenerate extends Base $f['datas'] = array_flip($field->getAttribute('options')); } } + $map = ['label' => 'label', 'default' => 'default']; + foreach ($map as $k => $v) { + $f[$k] = $field->getAttribute($v); + } $fields[$field->getName()] = $f; } $forms[] = $currentForm; diff --git a/app/Models/Traits/PublicationSettings.php b/app/Models/Traits/PublicationSettings.php index 659615fc8..27ad4f8d3 100644 --- a/app/Models/Traits/PublicationSettings.php +++ b/app/Models/Traits/PublicationSettings.php @@ -1457,6 +1457,13 @@ trait PublicationSettings 'store_in' => 'settings', 'translatable' => false, ]); + $this->addField('tagcommander_event_page', Textarea::class, __('Nom de l\'évenement de vue de page'), [ + 'v2' => '{"type":"text","default":"page","editable":true,"grade":3}', + 'default' => 'page', + 'fake' => true, + 'store_in' => 'settings', + 'translatable' => false, + ]); $this->addField('tagcommander_default_vars', Textarea::class, 'Variables par défaut', [ 'v2' => '{"type":"textarea","default":"","editable":true,"label":"Variables par d\\u00e9faut","grade":3}', 'default' => '',