Esempio n. 1
0
 /**
  * Prepare the layout, removing unneeded elements and changing button/form
  *
  * @return null
  */
 protected function _prepareLayout()
 {
     if (!Mage::helper('bronto_email')->isEnabledForAny()) {
         return parent::_prepareLayout();
     }
     parent::_prepareLayout();
     $this->unsetChild('to_plain_button');
     $this->unsetChild('to_html_button');
     $this->unsetChild('preview_button');
     $this->unsetChild('form');
     $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Save Message'), 'onclick' => 'templateControl.save();', 'class' => 'save')));
     $this->setChild('form', $this->getLayout()->createBlock('bronto_email/adminhtml_system_email_template_edit_form'));
     return $this;
 }
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $curWebsite = Mage::app()->getRequest()->getParam('website');
     $curStore = Mage::app()->getRequest()->getParam('store');
     $aParams = array();
     if ($curWebsite) {
         $aParams['website'] = $curWebsite;
     }
     if ($curStore) {
         $aParams['store'] = $curStore;
     }
     if (Mage::app()->getRequest()->getParam('fromaitemails')) {
         $sBackLocation = $this->getUrl('aitemails/index', $aParams);
     } else {
         $sBackLocation = $this->getUrl('*/*');
     }
     $this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Back'), 'onclick' => "window.location.href = '" . $sBackLocation . "'", 'class' => 'back')));
     return $this;
 }
Esempio n. 3
0
 public function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->unsetChild('preview_button');
 }
Esempio n. 4
0
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Back'), 'onclick' => "window.location.href = '" . $this->getUrl('*/*/import') . "'", 'class' => 'back')));
 }