From b49d7fae72adddb0eada7fbb618935f8d5cbc92c Mon Sep 17 00:00:00 2001 From: berliner Date: Thu, 19 Oct 2023 12:43:32 +0200 Subject: [PATCH] Fix the save button after the recent update to Gin LB, problem introduced in https://git.drupalcode.org/project/gin_lb/-/commit/3968b2a66bff2ad9123c0e4a85915e6a32ae4f1f --- composer.lock | 8 ++++---- html/modules/custom/ghi_blocks/ghi_blocks.module | 16 +--------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/composer.lock b/composer.lock index 8d92c1efc..94b78239a 100644 --- a/composer.lock +++ b/composer.lock @@ -3884,10 +3884,10 @@ "source": { "type": "git", "url": "https://git.drupalcode.org/project/layout_builder_ipe.git", - "reference": "26f2c0248e1f35f7867df6e18379480a17b0ad6c" + "reference": "70fe2d8211515ceeacb410cd8475a15313d57a95" }, "require": { - "drupal/core": "^9.2 || ^10" + "drupal/core": "^9.5 || ^10" }, "type": "drupal-module", "extra": { @@ -3895,8 +3895,8 @@ "dev-1.0.x": "1.0.x-dev" }, "drupal": { - "version": "1.0.0-beta6+6-dev", - "datestamp": "1690287893", + "version": "1.0.0-beta6+8-dev", + "datestamp": "1697711989", "security-coverage": { "status": "not-covered", "message": "Project has not opted into security advisory coverage!" diff --git a/html/modules/custom/ghi_blocks/ghi_blocks.module b/html/modules/custom/ghi_blocks/ghi_blocks.module index 725eaceac..f981869d8 100644 --- a/html/modules/custom/ghi_blocks/ghi_blocks.module +++ b/html/modules/custom/ghi_blocks/ghi_blocks.module @@ -6,7 +6,6 @@ */ use Drupal\Component\Serialization\Json; -use Drupal\Component\Utility\NestedArray; use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormStateInterface; @@ -389,21 +388,8 @@ function ghi_blocks_form_alter(array &$form, FormStateInterface $form_state, $fo if (array_key_exists('actions', $form) && array_key_exists('revert', $form['actions'])) { $form['actions']['revert']['#access'] = FALSE; } - // Do the same as gin_lb_form_alter(), but targeting the "finish" button - // that is used by page manager. - if (isset($form['actions']['finish'])) { - $form['actions']['finish'] = NestedArray::mergeDeepArray([ - $form['actions']['finish'], - [ - '#attributes' => [ - 'class' => [ - 'js-glb-button--primary', - ], - ], - ], - ]); - } } + $confirm_forms = [ 'layout_builder_discard_changes', 'layout_builder_revert_overrides',