Skip to content

Commit

Permalink
Merge pull request #40 from ASUWebPlatforms/ws2-1601
Browse files Browse the repository at this point in the history
WS2-1601 [PR] - (PART II) - ASU Header block form: Reordered fields, re-enabled A…
  • Loading branch information
mlsamuelson authored Apr 29, 2023
2 parents 11aebcc + 4c658ec commit 81e41f9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion asu_brand.links.menu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Define default links for this module.

asu_brand.asu_brand_settings::
asu_brand.asu_brand_settings:
title: ASU Brand Settings
description: ASU Brand global settings for header, cookie consent and Google Tag Manager.
parent: system.admin_config_system
Expand Down
16 changes: 8 additions & 8 deletions asu_brand.module
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ function asu_brand_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form

// Header block form UX improvements
if ($form_id === 'block_form' && $form['settings']['provider']['#value'] === "asu_brand") {
$form['settings']['label']['#title'] = t("Block admin title");
$form['settings']['label']['#disabled'] = TRUE;
$form['settings']['label']['#value'] = 'ASU brand header';
$form['region']['#weight'] = 0;
$form['region']['#description'] = $form['region']['#description'] . " If unsure, select Header.";
$form['#attached']['library'][] = 'asu_brand/block__system_main_block';
// Form body
$form['settings']['admin_label']['#access'] = FALSE;
$form['settings']['admin_label']['#weight'] = -2;
$form['settings']['label']['#weight'] = -1;
// Disable ability to show ASU Brand header titles above blocks
$form['settings']['label_display']['#title'] = t("Display block admin title");
$form['settings']['label_display']['#value'] = FALSE;
$form['settings']['label_display']['#disabled'] = TRUE;
$form['settings']['label_display']['#access'] = FALSE;
$form['settings']['label_display']['#description'] = t("Do not display the block admin title to visitors.");
$form['settings']['admin_label']['#title'] = 'ASU Brand header';
$form['region']['#weight'] = 10;
$form['id']['#weight'] = 11;
$form['#attached']['library'][] = 'asu_brand/block__system_main_block';
}

// Menu link edit forms for content links.
Expand Down
2 changes: 1 addition & 1 deletion css/asu-brand-edit-form.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.block-system-main-block > form#block-form > .form-item.form-item-settings-label {
display: none;
/* display: none; */
}

0 comments on commit 81e41f9

Please sign in to comment.