Example #1
0
 /**
  * Return header text for form
  *
  * @return string
  */
 public function getHeaderText()
 {
     if (!Mage::helper('bronto_email')->isEnabledForAny()) {
         return parent::getHeaderText();
     }
     if ($this->getEditMode()) {
         return Mage::helper('adminhtml')->__('Edit Template');
     }
     return Mage::helper('adminhtml')->__('New Template');
 }
Example #2
0
 public function testGetUsedCurrentlyForPaths()
 {
     $sectionMock = $this->getMock('Mage_Backend_Model_Config_Structure_Element_Section', array(), array(), '', false, false);
     $groupMock1 = $this->getMock('Mage_Backend_Model_Config_Structure_Element_Group', array(), array(), '', false, false);
     $groupMock2 = $this->getMock('Mage_Backend_Model_Config_Structure_Element_Group', array(), array(), '', false, false);
     $groupMock3 = $this->getMock('Mage_Backend_Model_Config_Structure_Element_Group', array(), array(), '', false, false);
     $filedMock = $this->getMock('Mage_Backend_Model_Config_Structure_Element_Field', array(), array(), '', false, false);
     $map = array(array(array('section1', 'group1'), $groupMock1), array(array('section1', 'group1', 'group2'), $groupMock2), array(array('section1', 'group1', 'group2', 'group3'), $groupMock3), array(array('section1', 'group1', 'field1'), $filedMock), array(array('section1', 'group1', 'group2', 'field1'), $filedMock), array(array('section1', 'group1', 'group2', 'group3', 'field1'), $filedMock));
     $sectionMock->expects($this->any())->method('getLabel')->will($this->returnValue('Section_1_Label'));
     $groupMock1->expects($this->any())->method('getLabel')->will($this->returnValue('Group_1_Label'));
     $groupMock2->expects($this->any())->method('getLabel')->will($this->returnValue('Group_2_Label'));
     $groupMock3->expects($this->any())->method('getLabel')->will($this->returnValue('Group_3_Label'));
     $filedMock->expects($this->any())->method('getLabel')->will($this->returnValue('Field_1_Label'));
     $this->_configStructureMock->expects($this->any())->method('getElement')->with('section1')->will($this->returnValue($sectionMock));
     $this->_configStructureMock->expects($this->any())->method('getElementByPathParts')->will($this->returnValueMap($map));
     $actual = $this->_block->getUsedCurrentlyForPaths(false);
     $expected = array(array(array('title' => 'Title'), array('title' => 'Title', 'url' => 'adminhtml/system_config/'), array('title' => 'Section_1_Label', 'url' => 'adminhtml/system_config/edit'), array('title' => 'Group_1_Label'), array('title' => 'Field_1_Label', 'scope' => 'GLOBAL')), array(array('title' => 'Title'), array('title' => 'Title', 'url' => 'adminhtml/system_config/'), array('title' => 'Section_1_Label', 'url' => 'adminhtml/system_config/edit'), array('title' => 'Group_1_Label'), array('title' => 'Group_2_Label'), array('title' => 'Field_1_Label', 'scope' => 'GLOBAL')), array(array('title' => 'Title'), array('title' => 'Title', 'url' => 'adminhtml/system_config/'), array('title' => 'Section_1_Label', 'url' => 'adminhtml/system_config/edit'), array('title' => 'Group_1_Label'), array('title' => 'Group_2_Label'), array('title' => 'Group_3_Label'), array('title' => 'Field_1_Label', 'scope' => 'GLOBAL')));
     $this->assertEquals($expected, $actual);
 }
 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;
 }
Example #4
0
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('fontis/wysiwyg/system/email/template/edit.phtml');
 }
Example #5
0
 public function __construct()
 {
     parent::__construct();
 }
Example #6
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')));
 }
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('connector/system/email/template/edit.phtml');
 }