Protected Member Functions | |
_getElementHtml (Varien_Data_Form_Element_Abstract $element) |
Definition at line 27 of file Updater.php.
_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 30 of file Updater.php.
00031 { 00032 $html = parent::_getElementHtml($element); 00033 00034 $js = '<script type="text/javascript"> 00035 var updater = new RegionUpdater("tax_defaults_country", "none", "tax_defaults_region", %s, "nullify"); 00036 if(updater.lastCountryId) { 00037 var tmpRegionId = $("tax_defaults_region").value; 00038 var tmpCountryId = updater.lastCountryId; 00039 updater.lastCountryId=false; 00040 updater.update(); 00041 updater.lastCountryId = tmpCountryId; 00042 $("tax_defaults_region").value = tmpRegionId; 00043 } else { 00044 updater.update(); 00045 } 00046 </script>'; 00047 00048 $html .= sprintf($js, $this->helper('directory')->getRegionJson()); 00049 return $html; 00050 }