summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormstenta2018-04-10 17:51:29 (GMT)
committerMark Carver2018-04-10 17:51:29 (GMT)
commit5b223c8501035900c171c5de6608498cf9b8dec9 (patch)
treeb7d7b989c0ba3e9f8084cb5e5bccfa2058116869
parent4431f7e43a65a500971f448333f43b7995b875b9 (diff)
Issue #2910624 by m.stenta, markcarver: Collapsible fieldsets are disabled when group is set
-rw-r--r--templates/bootstrap/bootstrap-panel.vars.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/templates/bootstrap/bootstrap-panel.vars.php b/templates/bootstrap/bootstrap-panel.vars.php
index 8c06a57..ced059d 100644
--- a/templates/bootstrap/bootstrap-panel.vars.php
+++ b/templates/bootstrap/bootstrap-panel.vars.php
@@ -18,6 +18,12 @@
* @ingroup theme_preprocess
*/
function bootstrap_preprocess_bootstrap_panel(array &$variables) {
+ // Temporarily provide field_group "support" until properly "fixed" upstream.
+ // @see https://www.drupal.org/project/bootstrap/issues/2910624
+ if (!empty($variables['element']['#group']->format_type) && $variables['element']['#group']->format_type == 'htab') {
+ $variables['element']['#collapsed'] = FALSE;
+ }
+
$element = &$variables['element'];
// Set the element's attributes.
@@ -44,11 +50,6 @@ function bootstrap_preprocess_bootstrap_panel(array &$variables) {
// Remove collapsed class as it should only be applied to the body.
_bootstrap_remove_class('collapsed', $element);
}
- // Force grouped fieldsets to not be collapsible (for vertical tabs).
- if (!empty($element['#group'])) {
- $variables['collapsible'] = FALSE;
- $variables['collapsed'] = FALSE;
- }
// Generate a unique identifier for the fieldset wrapper.
if (!isset($attributes['id'])) {