Advertisement
fanno

Untitled

Dec 18th, 2012
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.54 KB | None | 0 0
  1. <?
  2.         $options = array(
  3.             'onActive' => 'function(title, description){
  4.        description.setStyle("display", "block");
  5.        title.addClass("open").removeClass("closed");
  6.    }',
  7.             'onBackground' => 'function(title, description){
  8.        description.setStyle("display", "none");
  9.        title.addClass("closed").removeClass("open");
  10.    }',
  11.             'startOffset' => 0,  // 0 starts on the first tab, 1 starts the second, etc...
  12.             'useCookie' => true, // this must not be a string. Don't use quotes.
  13.         );
  14.  
  15.         echo JHtml::_('tabs.start', 'params', $options);
  16.         // Iterate through the extra form fieldsets and display each one.
  17.         foreach ($this->form->getFieldsets("params") as $fieldsets => $fieldset):
  18.             echo JHtml::_('tabs.panel', JText::_($fieldset->name), $fieldsets);
  19.  
  20.             ?>
  21.  
  22.                                     <?php
  23.                                     // Iterate through the fields and display them.
  24.                                     foreach($this->form->getFieldset($fieldset->name) as $field):
  25.                                         // If the field is hidden, just display the input.
  26.                                          ?>
  27.  
  28.                                             <?php
  29.                                         if ($field->hidden):
  30.                                             echo $field->input;
  31.                                         else:
  32.                                             ?>
  33.  
  34.                                                 <?php echo $field->label; ?>
  35.  
  36.                                                 <?php echo $field->input; ?>
  37.  
  38.                                             <?php
  39.                                         endif;
  40.                                             ?>
  41.  
  42.                                         <?php
  43.                                     endforeach;
  44.                                     ?>
  45.             <?php
  46.  
  47.         endforeach;
  48.         ?>
  49.     <?php echo JHtml::_('tabs.end'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement