summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-10-16 10:44:01 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2012-10-16 10:44:01 -0700
commitb96d440d8a862723b40661a4fe2da0573bef92ba (patch)
treead53e230cec25300d566788f5a1743778724f6d7 /includes
parenta5d723152b00a04cc915f3495671a9c7cb2ebca3 (diff)
downloadbrdo-b96d440d8a862723b40661a4fe2da0573bef92ba.tar.gz
brdo-b96d440d8a862723b40661a4fe2da0573bef92ba.tar.bz2
Revert "Issue #1742438 by larowlan, Christian Biggins, kim.pepper, dcam, Everett Zufelt, mgifford: Fixed Vertical tabs header and container rendered even when no vertical tabs."
Concerns raised in http://drupal.org/node/1742438#comment-6609888 that this breaks backwards compatibility. This reverts commit d462cafd50d5f7cbaab61f2cd271e3a5bc1df718.
Diffstat (limited to 'includes')
-rw-r--r--includes/form.inc22
1 files changed, 4 insertions, 18 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 6a1e2f751..826b6777b 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -3735,25 +3735,11 @@ function form_process_vertical_tabs($element, &$form_state) {
*/
function theme_vertical_tabs($variables) {
$element = $variables['element'];
- // Even if there are no tabs the element will still have a child element for
- // the active tab. We need to iterate over the tabs to ascertain if any
- // are visible before showing the wrapper and h2.
- $visible_tab = FALSE;
- $output = '';
- foreach (element_children($element['group']) as $tab_index) {
- if (!isset($element['group'][$tab_index]['#access']) ||
- !empty($element['group'][$tab_index]['#access'])) {
- $visible_tab = TRUE;
- break;
- }
- }
- if ($visible_tab) {
- // Add required JavaScript and Stylesheet.
- drupal_add_library('system', 'drupal.vertical-tabs');
+ // Add required JavaScript and Stylesheet.
+ drupal_add_library('system', 'drupal.vertical-tabs');
- $output = '<h2 class="element-invisible">' . t('Vertical Tabs') . '</h2>';
- $output .= '<div class="vertical-tabs-panes">' . $element['#children'] . '</div>';
- }
+ $output = '<h2 class="element-invisible">' . t('Vertical Tabs') . '</h2>';
+ $output .= '<div class="vertical-tabs-panes">' . $element['#children'] . '</div>';
return $output;
}