Public Member Functions | |
getAfterElementHtml () | |
getHtml () | |
Protected Member Functions | |
_getSpecificCountryElementId () |
Definition at line 35 of file Allowspecific.php.
_getSpecificCountryElementId | ( | ) | [protected] |
Definition at line 58 of file Allowspecific.php.
00059 { 00060 return substr($this->getId(), 0, strrpos($this->getId(), 'allowspecific')) . 'specificcountry'; 00061 }
getAfterElementHtml | ( | ) |
Reimplemented from Varien_Data_Form_Element_Abstract.
Definition at line 38 of file Allowspecific.php.
00039 { 00040 $javaScript = " 00041 <script type=\"text/javascript\"> 00042 Event.observe('{$this->getHtmlId()}', 'change', function(){ 00043 specific=$('{$this->getHtmlId()}').value; 00044 $('{$this->_getSpecificCountryElementId()}').disabled = (!specific || specific!=1); 00045 }); 00046 </script>"; 00047 return $javaScript . parent::getAfterElementHtml(); 00048 }
getHtml | ( | ) |
Reimplemented from Varien_Data_Form_Element_Abstract.
Definition at line 50 of file Allowspecific.php.
00051 { 00052 if(!$this->getValue() || $this->getValue()!=1) { 00053 $this->getForm()->getElement($this->_getSpecificCountryElementId())->setDisabled('disabled'); 00054 } 00055 return parent::getHtml(); 00056 }