Public Member Functions | |
getElementHtml () |
Definition at line 35 of file Default.php.
getElementHtml | ( | ) |
Retrieve Element HTML fragment
Reimplemented from Varien_Data_Form_Element_Select.
Definition at line 43 of file Default.php.
00044 { 00045 $disabled = false; 00046 if (!$this->getValue()) { 00047 $this->setData('disabled', 'disabled'); 00048 $disabled = true; 00049 } 00050 $html = parent::getElementHtml(); 00051 00052 $htmlId = 'use_config_' . $this->getHtmlId(); 00053 $html .= '<input id="'.$htmlId.'" value="1"'; 00054 $html .= ($disabled ? ' checked="checked"' : ''); 00055 if ($this->getReadonly()) { 00056 $html .= ' disabled="disabled"'; 00057 } 00058 $html .= 'onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox">'; 00059 00060 00061 00062 $html .= ' <label for="'.$htmlId.'" class="normal">' 00063 . Mage::helper('adminhtml')->__('Use Config Settings').'</label>'; 00064 $html .= '<script type="text/javascript">toggleValueElements($(\''.$htmlId.'\'), $(\''.$htmlId.'\').parentNode);</script>'; 00065 00066 return $html; 00067 }