]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7321 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 18 Feb 2025 13:08:42 +0000 (14:08 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 18 Feb 2025 13:08:42 +0000 (14:08 +0100)
app/SubForms/Link/PageBackgroundColor.php

index 6ec0caa9822abd15a9ef34bbb78d71976e2e75f6..ec05e1742c703bc1d4ffc16dd4f557b3a0723aa7 100644 (file)
@@ -3,14 +3,16 @@
 namespace App\SubForms\Link;
 // __('!! Editeur de liens')
 use App\Fluidbook\Link\Link;
+use Cubist\Backpack\Magic\Fields\FilesOrURL;
 
 class PageBackgroundColor extends Meta
 {
-    public $type = Link::COLOR;
+    public $type = Link::PAGE_BACKGROUND_COLOR;
 
     public function addDestinationField()
     {
         $this->addField('to', \Cubist\Backpack\Magic\Fields\Color::class, __('Couleur du fond'), ['allows_alpha' => false, 'allows_empty' => true]);
+        $this->addField('alternative', FilesOrURL::class, __('Image de fond'), $this->getFilesOrURLEntry() + ['accept' => self::$_acceptImage]);
         $this->addField('extra', \Cubist\Backpack\Magic\Fields\Color::class, __('Couleur des flèches'), ['default' => '', 'allows_alpha' => false, 'allows_empty' => true]);
         parent::addDestinationField();
     }