Mage_Tax_Block_Adminhtml_Frontend_Region_Updater Class Reference

Inheritance diagram for Mage_Tax_Block_Adminhtml_Frontend_Region_Updater:

Mage_Adminhtml_Block_System_Config_Form_Field Mage_Adminhtml_Block_Abstract Varien_Data_Form_Element_Renderer_Interface Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Protected Member Functions

 _getElementHtml (Varien_Data_Form_Element_Abstract $element)


Detailed Description

Definition at line 27 of file Updater.php.


Member Function Documentation

_getElementHtml ( Varien_Data_Form_Element_Abstract element  )  [protected]

Enter description here...

Parameters:
Varien_Data_Form_Element_Abstract $element
Returns:
string

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     }


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

Generated on Sat Jul 4 17:24:53 2009 for Magento by  doxygen 1.5.8