Skip to content
Snippets Groups Projects
Commit 2043d622 authored by Sascha Eggenberger's avatar Sascha Eggenberger
Browse files

Add check for routes

parent 2828e517
No related branches found
No related tags found
2 merge requests!518Issue 3480661: Add padding to bottom of ckeditor content.,!228Issue #3342164: Remove implicit dependency on node module for gin content form
......@@ -286,6 +286,9 @@ class GinContentFormHelper implements ContainerInjectionInterface {
/** @var \Drupal\gin\GinSettings $settings */
$settings = \Drupal::classResolver(GinSettings::class);
// 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;
......@@ -301,7 +304,8 @@ class GinContentFormHelper implements ContainerInjectionInterface {
strpos($form_id, '_confirm_form') !== FALSE ||
strpos($form_id, '_paragraphs_component_form') !== FALSE ||
strpos($form_id, '_delete_component_form') !== FALSE ||
in_array($form_id, $form_ids, TRUE)
in_array($form_id, $form_ids, TRUE) ||
in_array($route_name, $form_ids, TRUE)
) {
$sticky_action_buttons = FALSE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment