Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Offline_Store_Block_Adminhtml_Store_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
- {
- public function __construct()
- {
- $this->_objectId = 'store_id';
- $this->_controller = 'adminhtml_store';
- $this->_blockGroup = 'store';
- parent::__construct();
- $this->_updateButton('save', 'label', Mage::helper('store')->__('Save Block'));
- $this->_updateButton('delete', 'label', Mage::helper('store')->__('Delete Block'));
- $this->_addButton('saveandcontinue', array(
- 'label' => Mage::helper('adminhtml')->__('Save and Continue Edit'),
- 'onclick' => 'saveAndContinueEdit()',
- 'class' => 'save',
- ), -100);
- $this->_formScripts[] = "
- function saveAndContinueEdit(){
- editForm.submit($('edit_form').action+'back/edit/');
- }
- ";
- }
- /**
- * Get edit form container header text
- *
- * @return string
- */
- public function getHeaderText()
- {
- if (Mage::registry('store_block')->getId()) {
- return Mage::helper('store')->__("Edit Block '%s'", $this->escapeHtml(Mage::registry('store_block')->getTitle()));
- }
- else {
- return Mage::helper('store')->__('New Block');
- }
- }
- }
Add Comment
Please, Sign In to add comment