Skip to content

Commit

Permalink
Fix the save button after the recent update to Gin LB, problem introd…
Browse files Browse the repository at this point in the history
  • Loading branch information
berliner committed Oct 19, 2023
1 parent e1aa0f1 commit b49d7fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 1 addition & 15 deletions html/modules/custom/ghi_blocks/ghi_blocks.module
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit b49d7fa

Please sign in to comment.