*/ class Mage_Adminhtml_Block_Customer_System_Config_Validatevat extends Mage_Adminhtml_Block_System_Config_Form_Field { /** * Set template to itself * * @return Mage_Adminhtml_Block_Customer_System_Config_Validatevat */ protected function _prepareLayout() { parent::_prepareLayout(); if (!$this->getTemplate()) { $this->setTemplate('customer/system/config/validatevat.phtml'); } return $this; } /** * Unset some non-related element parameters * * @param Varien_Data_Form_Element_Abstract $element * @return string */ public function render(Varien_Data_Form_Element_Abstract $element) { $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue(); return parent::render($element); } /** * Get the button and scripts contents * * @param Varien_Data_Form_Element_Abstract $element * @return string */ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { $originalData = $element->getOriginalData(); $this->addData(array( 'button_label' => Mage::helper('customer')->__($originalData['button_label']), 'html_id' => $element->getHtmlId(), 'ajax_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/customer_system_config_validatevat/validate') )); return $this->_toHtml(); } }