]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7913
authorsoufiane <soufiane@cubedesigners.com>
Mon, 23 Feb 2026 10:09:37 +0000 (11:09 +0100)
committersoufiane <soufiane@cubedesigners.com>
Mon, 23 Feb 2026 10:09:37 +0000 (11:09 +0100)
app/SubForms/Link/AltTextImage.php [new file with mode: 0644]
app/SubForms/Link/Base.php

diff --git a/app/SubForms/Link/AltTextImage.php b/app/SubForms/Link/AltTextImage.php
new file mode 100644 (file)
index 0000000..2555185
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+
+namespace App\SubForms\Link;
+
+use App\Fluidbook\Link\Link;
+use Cubist\Backpack\Magic\Fields\FieldGroupStart;
+use Cubist\Backpack\Magic\Fields\Text;
+
+class AltTextImage extends Animated
+{
+    public $type = Link::ALT_TEXT_IMAGE;
+    public function addDestinationField()
+    {
+        $this->addField('to', \Cubist\Backpack\Magic\Fields\Textarea::class, __('Texte'));
+        $this->addField('group_position_icon', FieldGroupStart::class, __('Position de l\'icône'));
+        $this->addField('icon_x', Text::class, 'X', ['suffix' => '%', 'class' => 'calculation', 'default' => '100']);
+        $this->addField('icon_y', Text::class, 'Y', ['suffix' => '%', 'class' => 'calculation', 'default' => '100']);
+    }
+}
index 9ba371ad9e67b7368c3c7f6d7c7e6de6e62e8d98..2b9bf6e5fb7c0cbd8c32ffc0387e9ff9ef78b021 100644 (file)
@@ -125,6 +125,7 @@ class Base extends Form
             ['type' => \Fluidbook\Tools\Links\Link::OBJECT3D, 'label' => __('Objet 3D'), 'color' => '#00ffff', 'class' => Object3D::class],
             ['type' => \Fluidbook\Tools\Links\Link::LAYER_MASK, 'label' => __('Masque'), 'color' => '#e34f7b', 'class' => LayerMask::class],
             ['type' => \Fluidbook\Tools\Links\Link::SEARCH_WORD, 'label' => __('Mots à ajouter au moteur de recherche'), 'color' => '#726b45', 'class' => SearchWord::class],
+            ['type' => \Fluidbook\Tools\Links\Link::ALT_TEXT_IMAGE, 'label' => __('Texte alternatif'), 'color' => '#726b45', 'class' => AltTextImage::class],
             //['type' => \Fluidbook\Tools\Links\Link::HTML5MULTIMEDIA, 'label' => __('Lien Multimédia (HTML)'), 'color' => '#34A853', 'disabled' => true, 'class' => Web::class],
             //['type' => \Fluidbook\Tools\Links\Link::BOOKMARK_CORNER, 'label' => __('Lien marque-page sur coin de page'), 'color' => '#000000', 'disabled' => true, 'class' => Web::class],
             //['type' => \Fluidbook\Tools\Links\Link::PAGE_CORNER, 'label' => __('Coin de page'), 'color' => '#f19043', 'disabled' => true, 'class' => Web::class],