Download & Extend

div showing when there are no fieldsets

Project:Vertical Tabs
Version:6.x-1.x-dev
Component:Documentation
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

When there are no fieldsets to render as tabs there vertical_tabs form element is still added and can leave a gray line on the page.

Where vertical_tabs_form_alter has

<?php
       
// The JavaScript and CSS specific for this form.
       
$js = array(drupal_get_path('module', 'vertical_tabs') .'/vertical_tabs.node_form.js');
       
$css = array();

       
$form['vertical_tabs'] = array(
         
'#vertical_tabs_settings' => $settings,
         
'#vertical_tabs_js' => $js,
         
'#vertical_tabs_css' => $css,
         
'#form_id' => $form_id,
         
'#type' => 'markup',
         
'#value' => '',
         
'#weight' => 100,
         
'#theme' => 'vertical_tabs',
        );
?>

change it to:

<?php
   
if (!empty($settings)) {
       
// The JavaScript and CSS specific for this form.
       
$js = array(drupal_get_path('module', 'vertical_tabs') .'/vertical_tabs.node_form.js');
       
$css = array();

       
$form['vertical_tabs'] = array(
         
'#vertical_tabs_settings' => $settings,
         
'#vertical_tabs_js' => $js,
         
'#vertical_tabs_css' => $css,
         
'#form_id' => $form_id,
         
'#type' => 'markup',
         
'#value' => '',
         
'#weight' => 100,
         
'#theme' => 'vertical_tabs',
        );
    }
?>

This only adds the form element to the page if there is something to put in it.

Comments

#1

yeah man , that does the job.

#2

Status:active» fixed

Thanks committed.

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

nobody click here