public function __construct() { parent::__construct(); $this->setTemplate('Mage_Backend::widget/view/container.phtml'); $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() . '\'')); }
public function __construct() { if (is_null($this->_addButtonLabel)) { $this->_addButtonLabel = $this->__('Add New'); } if (is_null($this->_backButtonLabel)) { $this->_backButtonLabel = $this->__('Back'); } parent::__construct(); $this->setTemplate('Mage_Backend::widget/grid/container.phtml'); $this->_addButton('add', array('label' => $this->getAddButtonLabel(), 'onclick' => 'setLocation(\'' . $this->getCreateUrl() . '\')', 'class' => 'add')); }
public function __construct() { parent::__construct(); if (!$this->hasData('template')) { $this->setTemplate('Mage_Backend::widget/form/container.phtml'); } $this->_addButton('back', array('label' => Mage::helper('Mage_Backend_Helper_Data')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getBackUrl() . '\')', 'class' => 'back'), -1); $this->_addButton('reset', array('label' => Mage::helper('Mage_Backend_Helper_Data')->__('Reset'), 'onclick' => 'setLocation(window.location.href)'), -1); $objId = $this->getRequest()->getParam($this->_objectId); if (!empty($objId)) { $this->_addButton('delete', array('label' => Mage::helper('Mage_Backend_Helper_Data')->__('Delete'), 'class' => 'delete', 'onclick' => 'deleteConfirm(\'' . Mage::helper('Mage_Backend_Helper_Data')->__('Are you sure you want to do this?') . '\', \'' . $this->getDeleteUrl() . '\')')); } $this->_addButton('save', array('label' => Mage::helper('Mage_Backend_Helper_Data')->__('Save'), 'onclick' => 'editForm.submit();', 'class' => 'save'), 1); }