From e2e788b40909fc52ed38fe62d520a69cbeb12a1e Mon Sep 17 00:00:00 2001 From: Brett Cooper <brett@thewiznerd.com> Date: Fri, 16 May 2025 10:13:03 -0600 Subject: [PATCH] Untangled sticky action buttons hook from content form check. --- src/GinContentFormHelper.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/GinContentFormHelper.php b/src/GinContentFormHelper.php index b75ff1adf..189e65031 100644 --- a/src/GinContentFormHelper.php +++ b/src/GinContentFormHelper.php @@ -85,7 +85,7 @@ class GinContentFormHelper implements ContainerInjectionInterface { $is_content_form = $this->isContentForm($form, $form_state, $form_id); // Sticky action buttons. - if (($use_sticky_action_buttons || $is_content_form) && isset($form['actions'])) { + if ($use_sticky_action_buttons && isset($form['actions'])) { // Add sticky class. $form['actions']['#attributes']['class'][] = 'gin-sticky-form-actions'; @@ -264,8 +264,10 @@ class GinContentFormHelper implements ContainerInjectionInterface { // Get route name. $route_name = $this->routeMatch->getRouteName(); - // Sets default to TRUE if setting is enabled. - $sticky_action_buttons = $settings->get('sticky_action_buttons') ? TRUE : FALSE; + // Sets default to TRUE if setting is enabled or if this is a content form. + $sticky_action_buttons = $settings->get('sticky_action_buttons') + ? TRUE + : $this->isContentForm($form, $form_state, $form_id); // API check. $form_ids = $this->moduleHandler->invokeAll('gin_ignore_sticky_form_actions'); -- GitLab