protected function _construct() { if (is_null($this->_addButtonLabel)) { $this->_addButtonLabel = $this->__('Add New'); } if (is_null($this->_backButtonLabel)) { $this->_backButtonLabel = $this->__('Back'); } parent::_construct(); $this->_addButton('add', array('label' => $this->getAddButtonLabel(), 'onclick' => 'setLocation(\'' . $this->getCreateUrl() . '\')', 'class' => 'add')); }
protected function _construct() { parent::_construct(); $this->_addButton('back', array('label' => $this->__('Back'), 'onclick' => 'setLocation(\'' . $this->getBackUrl() . '\')', 'class' => 'back'), -1); $this->_addButton('reset', array('label' => $this->__('Reset'), 'onclick' => 'setLocation(window.location.href)'), -1); $objId = $this->getRequest()->getParam($this->_objectId); if (!empty($objId)) { $this->_addButton('delete', array('label' => $this->__('Delete'), 'class' => 'delete', 'onclick' => 'deleteConfirm(\'' . $this->__('Are you sure you want to do this?') . '\', \'' . $this->getDeleteUrl() . '\')')); } $this->_addButton('save', array('label' => $this->__('Save'), 'class' => 'save', 'data_attribute' => array('mage-init' => array('button' => array('event' => 'save', 'target' => '#edit_form')))), 1); }
protected function _construct() { parent::_construct(); $this->_addButton('back', array('label' => Mage::helper('Mage_Backend_Helper_Data')->__('Back'), 'onclick' => 'window.location.href=\'' . $this->getUrl('*/*/') . '\'', 'class' => 'back')); $this->_addButton('edit', array('label' => Mage::helper('Mage_Backend_Helper_Data')->__('Edit'), 'class' => 'edit', 'onclick' => 'window.location.href=\'' . $this->getEditUrl() . '\'')); }