diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c25db46..f6b77d18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Stanford Profile Helper +8.x-1.10 +-------------------------------------------------------------------------------- +_Release Date: 2021-03-09_ + +- Allow only 3 items per row on basic pages. + 8.x-1.9 -------------------------------------------------------------------------------- _Release Date: 2021-03-05_ diff --git a/modules/stanford_paragraph_card/stanford_paragraph_card.info.yml b/modules/stanford_paragraph_card/stanford_paragraph_card.info.yml index 91d5febc..1643cd7d 100644 --- a/modules/stanford_paragraph_card/stanford_paragraph_card.info.yml +++ b/modules/stanford_paragraph_card/stanford_paragraph_card.info.yml @@ -1,6 +1,6 @@ name: 'Stanford Paragraph Card' description: 'Adds helpers and modifications to the card paragraph type.' -version: 8.x-1.9 +version: 8.x-1.10 core_version_requirement: '^8 || ^9' type: module project: Stanford diff --git a/modules/stanford_profile_drush/stanford_profile_drush.info.yml b/modules/stanford_profile_drush/stanford_profile_drush.info.yml index 2e832dae..8a304913 100644 --- a/modules/stanford_profile_drush/stanford_profile_drush.info.yml +++ b/modules/stanford_profile_drush/stanford_profile_drush.info.yml @@ -1,6 +1,6 @@ name: 'Stanford Profile Drush' description: 'A collection of Drush commands since commands in the profile are not discoverable.' -version: 8.x-1.9 +version: 8.x-1.10 core_version_requirement: '^8 || ^9' type: module project: Stanford diff --git a/modules/stanford_profile_styles/stanford_profile_styles.info.yml b/modules/stanford_profile_styles/stanford_profile_styles.info.yml index d1ad4ac7..081bea0a 100644 --- a/modules/stanford_profile_styles/stanford_profile_styles.info.yml +++ b/modules/stanford_profile_styles/stanford_profile_styles.info.yml @@ -1,6 +1,6 @@ name: 'Stanford Profile Styles' description: 'A module for theming' -version: 8.x-1.9 +version: 8.x-1.10 core_version_requirement: '^8 || ^9' type: module project: Stanford diff --git a/stanford_profile_helper.info.yml b/stanford_profile_helper.info.yml index 335c671c..c359372c 100644 --- a/stanford_profile_helper.info.yml +++ b/stanford_profile_helper.info.yml @@ -3,7 +3,7 @@ type: module description: 'Stanford Profile Helper Module.' core_version_requirement: ^8.8 || ^9 package: Stanford -version: 8.x-1.9 +version: 8.x-1.10 dependencies: - 'admin_toolbar:admin_toolbar' - 'admin_toolbar:admin_toolbar_tools' diff --git a/stanford_profile_helper.module b/stanford_profile_helper.module index e83d05d7..ba1b6dd4 100644 --- a/stanford_profile_helper.module +++ b/stanford_profile_helper.module @@ -840,3 +840,14 @@ function stanford_profile_helper_preprocess_menu(&$variables) { } } } + +/** + * Implements hook_field_widget_form_alter(). + */ +function stanford_profile_helper_field_widget_form_alter(&$element, FormStateInterface $form_state, $context) { + if ($context['items']->getName() == 'su_page_components') { + // Push pages to only allow 3 items per row but don't break any existing + // pages that have 4 per row. + $element['container']['value']['#attached']['drupalSettings']['reactParagraphs'][0]['itemsPerRow'] = 3; + } +}