From 7697d98bf9f3a6512bb694201120bac000450e8c Mon Sep 17 00:00:00 2001 From: Sascha Eggenberger <hello@saschaeggenberger.com> Date: Fri, 27 Dec 2024 17:42:02 +0100 Subject: [PATCH] Fix check for status --- src/GinContentFormHelper.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/GinContentFormHelper.php b/src/GinContentFormHelper.php index 006722cce..4f4a1192f 100644 --- a/src/GinContentFormHelper.php +++ b/src/GinContentFormHelper.php @@ -115,7 +115,6 @@ class GinContentFormHelper implements ContainerInjectionInterface { // Sticky action buttons. if (($use_sticky_action_buttons || $is_content_form) && isset($form['actions'])) { - // Add sticky class. $form['actions']['#attributes']['class'][] = 'gin-sticky-form-actions'; @@ -166,7 +165,6 @@ class GinContentFormHelper implements ContainerInjectionInterface { // Only alter the status field on content forms. if ($is_content_form) { - // Set form id to status field. if (isset($form['status']['widget']) && isset($form['status']['widget']['value'])) { $form['status']['widget']['value']['#attributes']['form'] = $form['#id']; @@ -176,10 +174,9 @@ class GinContentFormHelper implements ContainerInjectionInterface { $widget_type = $form['status']['widget']['#type'] ?? FALSE; } // Only move status to status group if it is a checkbox. - if ($widget_type === 'checkbox' && isset($form['status']['#group'])) { + if ($widget_type === 'checkbox') { $form['status']['#group'] = 'status'; } - } // Helper item to move focus to sticky header. -- GitLab