Protected Member Functions | |
_getElementHtml (Varien_Data_Form_Element_Abstract $element) | |
_appendJs ($element) | |
Protected Attributes | |
$_addRowButtonHtml = array() | |
$_removeRowButtonHtml = array() |
Definition at line 27 of file Countries.php.
_appendJs | ( | $ | element | ) | [protected] |
Definition at line 40 of file Countries.php.
00041 { 00042 $elId = $element->getHtmlId(); 00043 $childId = str_replace('sallowspecific', 'specificcountry', $elId); 00044 $html = "<script> 00045 var dwvie = function () 00046 { 00047 var valueSelectId = '{$elId}'; 00048 var elementToDisableId = '{$childId}'; 00049 00050 var source = $(valueSelectId); 00051 var target = $(elementToDisableId); 00052 00053 if (source.options[source.selectedIndex].value == '0') { 00054 target.disabled = true; 00055 } else { 00056 target.disabled = false; 00057 } 00058 } 00059 00060 Event.observe('{$elId}', 'change', dwvie); 00061 Event.observe(window, 'load', dwvie); 00062 </script>"; 00063 return $html; 00064 }
_getElementHtml | ( | Varien_Data_Form_Element_Abstract $ | element | ) | [protected] |
Enter description here...
Varien_Data_Form_Element_Abstract | $element |
Reimplemented from Mage_Adminhtml_Block_System_Config_Form_Field.
Definition at line 33 of file Countries.php.
00034 { 00035 $html = parent::_getElementHtml($element); 00036 $html .= $this->_appendJs($element); 00037 return $html; 00038 }
$_addRowButtonHtml = array() [protected] |
Definition at line 30 of file Countries.php.
$_removeRowButtonHtml = array() [protected] |
Definition at line 31 of file Countries.php.