Public Member Functions | |
render (Varien_Data_Form_Element_Abstract $element) | |
Protected Member Functions | |
_getHeaderHtml ($element) | |
_getFooterHtml ($element) | |
_getCollapseState ($element) |
Definition at line 35 of file Fieldset.php.
_getCollapseState | ( | $ | element | ) | [protected] |
Definition at line 99 of file Fieldset.php.
00100 { 00101 $extra = Mage::getSingleton('admin/session')->getUser()->getExtra(); 00102 if (isset($extra['configState'][$element->getId()])) { 00103 return $extra['configState'][$element->getId()]; 00104 } 00105 return false; 00106 }
_getFooterHtml | ( | $ | element | ) | [protected] |
Enter description here...
Varien_Data_Form_Element_Abstract | $element |
Definition at line 93 of file Fieldset.php.
00094 { 00095 $html = '</tbody></table></fieldset>' . Mage::helper('adminhtml/js')->getScript("Fieldset.applyCollapse('{$element->getHtmlId()}')"); 00096 return $html; 00097 }
_getHeaderHtml | ( | $ | element | ) | [protected] |
Enter description here...
Varien_Data_Form_Element_Abstract | $element |
Definition at line 65 of file Fieldset.php.
00066 { 00067 $default = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store'); 00068 00069 $html = '<div class="entry-edit-head collapseable" ><a id="'.$element->getHtmlId().'-head" href="#" onclick="Fieldset.toggleCollapse(\''.$element->getHtmlId().'\', \''.$this->getUrl('*/*/state').'\'); return false;">'.$element->getLegend().'</a></div>'; 00070 $html.= '<input id="'.$element->getHtmlId().'-state" name="config_state['.$element->getId().']" type="hidden" value="'.(int)$this->_getCollapseState($element).'" />'; 00071 $html.= '<fieldset class="config collapseable" id="'.$element->getHtmlId().'">'; 00072 $html.= '<legend>'.$element->getLegend().'</legend>'; 00073 00074 if ($element->getComment()) { 00075 $html .= '<div class="comment">'.$element->getComment().'</div>'; 00076 } 00077 // field label column 00078 $html.= '<table cellspacing="0" class="form-list"><colgroup class="label" /><colgroup class="value" />'; 00079 if (!$default) { 00080 $html.= '<colgroup class="use-default" />'; 00081 } 00082 $html.= '<tbody>'; 00083 00084 return $html; 00085 }
render | ( | Varien_Data_Form_Element_Abstract $ | element | ) |
Render fieldset html
Varien_Data_Form_Element_Abstract | $element |
Implements Varien_Data_Form_Element_Renderer_Interface.
Reimplemented in Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput, and Mage_Adminhtml_Block_System_Config_Form_Fieldset_Order_Statuses.
Definition at line 46 of file Fieldset.php.
00047 { 00048 $html = $this->_getHeaderHtml($element); 00049 00050 foreach ($element->getElements() as $field) { 00051 $html.= $field->toHtml(); 00052 } 00053 00054 $html .= $this->_getFooterHtml($element); 00055 00056 return $html; 00057 }