protected function _prepareLayout() { parent::_prepareLayout(); if ($this->getRequest()->getModuleName() == 'admin' && $this->getRequest()->getControllerName() == 'system_config' && $this->getRequest()->getActionName() == 'edit' && $this->getRequest()->getParam('section') == 'onestepcheckout') { $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Save Config'), 'onclick' => 'checkValueRequire()', 'class' => 'save'))); } else { $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Save Config'), 'onclick' => 'configForm.submit()', 'class' => 'save'))); } }
public function __construct() { parent::__construct(); $sectionCode = $this->getRequest()->getParam('section'); $sections = Mage::getSingleton('adminhtml/config')->getSections(); $session = Mage::getSingleton('admin/session'); if (false !== strpos($sectionCode, 'mageworx')) { $groups = $this->_section->groups[0]; foreach ($groups as $group => $object) { if (!$session->isAllowed("system/config/{$sectionCode}/{$group}")) { $sections->{$sectionCode}->groups->{$group} = null; } } } $this->_section = $sections->{$sectionCode}; $this->setTitle((string) $this->_section->label); }
protected function _prepareLayout() { $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Save Config'), 'onclick' => 'configForm.submit()', 'class' => 'save'))); return parent::_prepareLayout(); }
public function getSaveButtonHtml() { return $this->getChildHtml('qsearch') . parent::getSaveButtonHtml(); }