
Public Member Functions | |
| __construct () | |
| getModel () | |
| getBackButtonHtml () | |
| getToggleButtonHtml () | |
| getResetButtonHtml () | |
| getToPlainButtonHtml () | |
| getToHtmlButtonHtml () | |
| getSaveButtonHtml () | |
| getPreviewButtonHtml () | |
| getDeleteButtonHtml () | |
| getSaveAsButtonHtml () | |
| setEditMode ($value=true) | |
| getEditMode () | |
| getHeaderText () | |
| getForm () | |
| getJsTemplateName () | |
| getSaveUrl () | |
| getPreviewUrl () | |
| isTextType () | |
| getDeleteUrl () | |
| getSaveAsFlag () | |
Protected Member Functions | |
| _prepareLayout () | |
Protected Attributes | |
| $_editMode = false | |
Definition at line 35 of file Edit.php.
| __construct | ( | ) |
Define Edit template
Reimplemented from Varien_Object.
Definition at line 48 of file Edit.php.
00049 { 00050 parent::__construct(); 00051 $this->setTemplate('newsletter/template/edit.phtml'); 00052 }
| _prepareLayout | ( | ) | [protected] |
Preparing block layout
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 69 of file Edit.php.
00070 { 00071 $this->setChild('back_button', 00072 $this->getLayout()->createBlock('adminhtml/widget_button') 00073 ->setData(array( 00074 'label' => Mage::helper('newsletter')->__('Back'), 00075 'onclick' => "window.location.href = '" . $this->getUrl('*/*') . "'", 00076 'class' => 'back' 00077 )) 00078 ); 00079 00080 $this->setChild('reset_button', 00081 $this->getLayout()->createBlock('adminhtml/widget_button') 00082 ->setData(array( 00083 'label' => Mage::helper('newsletter')->__('Reset'), 00084 'onclick' => 'window.location.href = window.location.href' 00085 )) 00086 ); 00087 00088 $this->setChild('to_plain_button', 00089 $this->getLayout()->createBlock('adminhtml/widget_button') 00090 ->setData(array( 00091 'label' => Mage::helper('newsletter')->__('Convert to Plain Text'), 00092 'onclick' => 'templateControl.stripTags();', 00093 'id' => 'convert_button', 00094 'class' => 'task' 00095 )) 00096 ); 00097 00098 $this->setChild('to_html_button', 00099 $this->getLayout()->createBlock('adminhtml/widget_button') 00100 ->setData(array( 00101 'label' => Mage::helper('newsletter')->__('Return Html Version'), 00102 'onclick' => 'templateControl.unStripTags();', 00103 'id' => 'convert_button_back', 00104 'style' => 'display:none', 00105 'class' => 'task' 00106 )) 00107 ); 00108 00109 $this->setChild('toggle_button', 00110 $this->getLayout()->createBlock('adminhtml/widget_button') 00111 ->setData(array( 00112 'label' => Mage::helper('newsletter')->__('Toggle Editor'), 00113 'onclick' => 'templateControl.toggleEditor();', 00114 'id' => 'toggle_button', 00115 'class' => 'task' 00116 )) 00117 ); 00118 00119 $this->setChild('save_button', 00120 $this->getLayout()->createBlock('adminhtml/widget_button') 00121 ->setData(array( 00122 'label' => Mage::helper('newsletter')->__('Save Template'), 00123 'onclick' => 'templateControl.save();', 00124 'class' => 'save' 00125 )) 00126 ); 00127 00128 $this->setChild('save_as_button', 00129 $this->getLayout()->createBlock('adminhtml/widget_button') 00130 ->setData(array( 00131 'label' => Mage::helper('newsletter')->__('Save As'), 00132 'onclick' => 'templateControl.saveAs();', 00133 'class' => 'save' 00134 )) 00135 ); 00136 00137 $this->setChild('preview_button', 00138 $this->getLayout()->createBlock('adminhtml/widget_button') 00139 ->setData(array( 00140 'label' => Mage::helper('newsletter')->__('Preview Template'), 00141 'onclick' => 'templateControl.preview();', 00142 'class' => 'task' 00143 )) 00144 ); 00145 00146 $this->setChild('delete_button', 00147 $this->getLayout()->createBlock('adminhtml/widget_button') 00148 ->setData(array( 00149 'label' => Mage::helper('newsletter')->__('Delete Template'), 00150 'onclick' => 'templateControl.deleteTemplate();', 00151 'class' => 'delete' 00152 )) 00153 ); 00154 00155 return parent::_prepareLayout(); 00156 }
| getBackButtonHtml | ( | ) |
Retrieve Back Button HTML
Definition at line 163 of file Edit.php.
00164 { 00165 return $this->getChildHtml('back_button'); 00166 }
| getDeleteButtonHtml | ( | ) |
Retrieve Delete Button HTML
Definition at line 233 of file Edit.php.
00234 { 00235 return $this->getChildHtml('delete_button'); 00236 }
| getDeleteUrl | ( | ) |
Return delete url for customer group
Definition at line 341 of file Edit.php.
00342 { 00343 return $this->getUrl('*/*/delete', array('id' => $this->getRequest()->getParam('id'))); 00344 }
| getEditMode | ( | ) |
| getForm | ( | ) |
| getHeaderText | ( | ) |
Return header text for form
Definition at line 275 of file Edit.php.
00276 { 00277 if ($this->getEditMode()) { 00278 return Mage::helper('newsletter')->__('Edit Newsletter Template'); 00279 } 00280 00281 return Mage::helper('newsletter')->__('New Newsletter Template'); 00282 }
| getJsTemplateName | ( | ) |
| getModel | ( | ) |
Retrieve template object
Definition at line 59 of file Edit.php.
00060 { 00061 return Mage::registry('_current_template'); 00062 }
| getPreviewButtonHtml | ( | ) |
Retrieve Preview Button HTML
Definition at line 223 of file Edit.php.
00224 { 00225 return $this->getChildHtml('preview_button'); 00226 }
| getPreviewUrl | ( | ) |
| getResetButtonHtml | ( | ) |
Retrieve Reset Button HTML
Definition at line 183 of file Edit.php.
00184 { 00185 return $this->getChildHtml('reset_button'); 00186 }
| getSaveAsButtonHtml | ( | ) |
Retrieve Save as Button HTML
Definition at line 243 of file Edit.php.
00244 { 00245 return $this->getChildHtml('save_as_button'); 00246 }
| getSaveAsFlag | ( | ) |
Retrieve Save As Flag
Definition at line 351 of file Edit.php.
00352 { 00353 return $this->getRequest()->getParam('_save_as_flag') ? '1' : ''; 00354 }
| getSaveButtonHtml | ( | ) |
Retrieve Save Button HTML
Definition at line 213 of file Edit.php.
00214 { 00215 return $this->getChildHtml('save_button'); 00216 }
| getSaveUrl | ( | ) |
| getToggleButtonHtml | ( | ) |
Retrieve Toggle Button HTML
Definition at line 173 of file Edit.php.
00174 { 00175 return $this->getChildHtml('toggle_button'); 00176 }
| getToHtmlButtonHtml | ( | ) |
Retrieve Convert to HTML Button HTML
Definition at line 203 of file Edit.php.
00204 { 00205 return $this->getChildHtml('to_html_button'); 00206 }
| getToPlainButtonHtml | ( | ) |
Retrieve Convert To Plain Button HTML
Definition at line 193 of file Edit.php.
00194 { 00195 return $this->getChildHtml('to_plain_button'); 00196 }
| isTextType | ( | ) |
| setEditMode | ( | $ | value = true |
) |
1.5.8