function fieldset_helper_test in Fieldset helper 6.2
Same name and namespace in other branches
- 6 fieldset_helper.admin.inc \fieldset_helper_test()
- 7.2 fieldset_helper.admin.inc \fieldset_helper_test()
Test page for the 'Fieldset helper' module.
1 string reference to 'fieldset_helper_test'
- fieldset_helper_menu in ./
fieldset_helper.module - Implementation of hook_menu().
File
- ./
fieldset_helper.admin.inc, line 175 - Administration page for the 'Fieldset helper' module.
Code
function fieldset_helper_test() {
$output = '';
// Toggle allollasible
$output .= theme('fieldset_helper_toggle_all');
// Test FAPI fieldsets
$output .= '<h3>' . t('Test collapsible fieldsets associated with a FAPI form') . '</h3>';
$output .= drupal_get_form('fieldset_helper_test_form');
// Test unassociated fieldsets
$output .= '<h3>' . t('Test a collapsible fieldset that is not associated with a form or node') . '</h3>';
$element = array(
'#type' => 'fieldset',
'#title' => t('The un-associated fieldset'),
'#value' => '<div>' . t('Testing the un-associated fieldset') . '</div>',
'#collapsible' => TRUE,
);
$output .= theme('fieldset', $element);
// Test unassociated fieldsets
$output .= '<h3>' . t('Test a collapsible fieldset that is just plain html') . '</h3>';
$output .= '<fieldset class="collapsible"><legend>The plain html fieldset</legend><div>';
$output .= t('Testing a fieldset that is plain html');
$output .= '<fieldset class="collapsible"><legend>A nested plain html fieldset</legend><div>' . t('Testing a nested fieldset that is plain html') . '</div></fieldset>';
$output .= '</div></fieldset>';
return $output;
}