From: Vincent Vanwaelscappel Date: Mon, 18 Oct 2021 17:04:01 +0000 (+0200) Subject: wip #4795 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a2d2b3f03e090714393c58ff7080149d4acb393f;p=odl.git wip #4795 @0.25 --- diff --git a/app/Models/Tour.php b/app/Models/Tour.php index 90e473e..58eaa34 100644 --- a/app/Models/Tour.php +++ b/app/Models/Tour.php @@ -1,9 +1,6 @@ addField('memo_title', 'Text', 'Titre du mémo'); - $this->addField('memo_text', 'Textarea', 'Chapo du mémo'); + $this->addField('memo_title', 'Text', 'Titre'); + $this->addField('memo_text', 'Textarea', 'Chapo'); $this->addField('memo_pdf', Files::class, 'PDF'); $this->addField('memo_image', Images::class, 'Vignette'); } diff --git a/app/SubForms/TourTheme.php b/app/SubForms/TourTheme.php index a762dee..26e6791 100644 --- a/app/SubForms/TourTheme.php +++ b/app/SubForms/TourTheme.php @@ -2,13 +2,16 @@ namespace App\SubForms; +use Cubist\Backpack\Magic\Fields\BunchOfFieldsMultiple; +use Cubist\Backpack\Magic\Fields\Text; use Cubist\Backpack\Magic\SubForm; class TourTheme extends SubForm { -public function init() -{ - parent::init(); - $this->addField('theme_title',Text::class,'Titre du thème'); -} + public function init() + { + parent::init(); + $this->addField('theme_title', Text::class, 'Titre du thème'); + $this->addField('theme_documents', BunchOfFieldsMultiple::class, 'Documents', ['bunch' => ResourceMemo::class, 'add_label' => 'Ajouter un document']); + } }