Skip to content

Commit

Permalink
Merge pull request #83 from SU-SWS/release-8.1.10
Browse files Browse the repository at this point in the history
8.1.10
  • Loading branch information
imonroe authored Mar 10, 2021
2 parents efab0da + 16b50e6 commit c81f7f0
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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_
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion stanford_profile_helper.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
11 changes: 11 additions & 0 deletions stanford_profile_helper.module
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit c81f7f0

Please sign in to comment.