Mage_Adminhtml_Block_System_Config_Form_Field_Select_Allowspecific Class Reference

Inheritance diagram for Mage_Adminhtml_Block_System_Config_Form_Field_Select_Allowspecific:

Varien_Data_Form_Element_Select Varien_Data_Form_Element_Abstract Varien_Data_Form_Abstract Varien_Object

List of all members.

Public Member Functions

 getAfterElementHtml ()
 getHtml ()

Protected Member Functions

 _getSpecificCountryElementId ()


Detailed Description

Definition at line 35 of file Allowspecific.php.


Member Function Documentation

_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     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:03 2009 for Magento by  doxygen 1.5.8