Publié le

Empêcher la suppresion du bouton Save & Edit avec Gin 3.0.0-rc12

Drupal

https://www.drupal.org/project/gin/issues/3219020

diff --git a/src/GinContentFormHelper.php b/src/GinContentFormHelper.php
index 8e39cd0..3b6b262 100644
--- a/src/GinContentFormHelper.php
+++ b/src/GinContentFormHelper.php
@@ -164,7 +164,7 @@ class GinContentFormHelper implements ContainerInjectionInterface {
         $form['actions']['gin_more_actions']['gin_more_actions_items']['#attributes']['class'] = ['gin-more-actions__menu'];
 
         // Unset all items we move to the more actions menu.
-        $excludes = ['save', 'submit', 'preview', 'gin_more_actions'];
+        $excludes = ['save', 'submit', 'preview', 'save_edit', 'gin_more_actions'];
         foreach (Element::children($form['actions']) as $key => $item) {
           if (!empty($form['actions'][$item]['#gin_action_item'])) {
             $excludes[] = $item;