00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 class Mage_Adminhtml_Block_System_Design_Edit extends Mage_Adminhtml_Block_Widget
00028 {
00029 public function __construct()
00030 {
00031 parent::__construct();
00032 $this->setTemplate('system/design/edit.phtml');
00033 $this->setId('design_edit');
00034 }
00035
00036 protected function _prepareLayout()
00037 {
00038 $this->setChild('back_button',
00039 $this->getLayout()->createBlock('adminhtml/widget_button')
00040 ->setData(array(
00041 'label' => Mage::helper('core')->__('Back'),
00042 'onclick' => 'setLocation(\''.$this->getUrl('*/*/').'\')',
00043 'class' => 'back'
00044 ))
00045 );
00046
00047 $this->setChild('save_button',
00048 $this->getLayout()->createBlock('adminhtml/widget_button')
00049 ->setData(array(
00050 'label' => Mage::helper('core')->__('Save'),
00051 'onclick' => 'designForm.submit()',
00052 'class' => 'save'
00053 ))
00054 );
00055
00056 $this->setChild('delete_button',
00057 $this->getLayout()->createBlock('adminhtml/widget_button')
00058 ->setData(array(
00059 'label' => Mage::helper('core')->__('Delete'),
00060 'onclick' => 'confirmSetLocation(\''.Mage::helper('core')->__('Are you sure?').'\', \''.$this->getDeleteUrl().'\')',
00061 'class' => 'delete'
00062 ))
00063 );
00064 return parent::_prepareLayout();
00065 }
00066
00067 public function getDesignChangeId()
00068 {
00069 return Mage::registry('design')->getId();
00070 }
00071
00072 public function getDeleteUrl()
00073 {
00074 return $this->getUrl('*
00075
00076
00077
00078
00079 */save', array('_current'=>true));
00080 }
00081
00082 public function getValidationUrl()
00083 {
00084 return $this->getUrl('*
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097