Public Member Functions | |
__construct () | |
_prepareForm () |
Definition at line 26 of file Design.php.
__construct | ( | ) |
Class constructor
Reimplemented from Mage_Adminhtml_Block_Widget_Form.
Definition at line 28 of file Design.php.
00029 { 00030 parent::__construct(); 00031 $this->setShowGlobalIcon(true); 00032 }
_prepareForm | ( | ) |
Prepare form before rendering HTML
Reimplemented from Mage_Adminhtml_Block_Widget_Form.
Definition at line 34 of file Design.php.
00035 { 00036 $form = new Varien_Data_Form(); 00037 00038 $form->setHtmlIdPrefix('page_'); 00039 00040 $model = Mage::registry('cms_page'); 00041 00042 $fieldset = $form->addFieldset('design_fieldset', array( 00043 'legend' => Mage::helper('cms')->__('Custom Design'), 00044 'class' => 'fieldset-wide', 00045 )); 00046 00047 $fieldset->addField('custom_theme', 'select', array( 00048 'name' => 'custom_theme', 00049 'label' => Mage::helper('cms')->__('Custom Theme'), 00050 'values' => Mage::getModel('core/design_source_design')->getAllOptions(), 00051 )); 00052 00053 $fieldset->addField('custom_theme_from', 'date', array( 00054 'name' => 'custom_theme_from', 00055 'label' => Mage::helper('cms')->__('Custom Theme From'), 00056 'image' => $this->getSkinUrl('images/grid-cal.gif'), 00057 'format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) 00058 )); 00059 00060 $fieldset->addField('custom_theme_to', 'date', array( 00061 'name' => 'custom_theme_to', 00062 'label' => Mage::helper('cms')->__('Custom Theme To'), 00063 'image' => $this->getSkinUrl('images/grid-cal.gif'), 00064 'format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) 00065 )); 00066 00067 00068 $fieldset->addField('root_template', 'select', array( 00069 'name' => 'root_template', 00070 'label' => Mage::helper('cms')->__('Layout'), 00071 'required' => true, 00072 'values' => Mage::getSingleton('page/source_layout')->toOptionArray(), 00073 )); 00074 00075 $fieldset->addField('layout_update_xml', 'editor', array( 00076 'name' => 'layout_update_xml', 00077 'label' => Mage::helper('cms')->__('Layout Update XML'), 00078 'style' => 'height:24em;' 00079 )); 00080 00081 $form->setValues($model->getData()); 00082 00083 $this->setForm($form); 00084 00085 return parent::_prepareForm(); 00086 }