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
00028
00029
00030
00031
00032
00033
00034 class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Toolbar_Add extends Mage_Adminhtml_Block_Template
00035 {
00036 protected function _construct()
00037 {
00038 $this->setTemplate('catalog/product/attribute/set/toolbar/add.phtml');
00039 }
00040
00041 protected function _prepareLayout()
00042 {
00043 $this->setChild('save_button',
00044 $this->getLayout()->createBlock('adminhtml/widget_button')
00045 ->setData(array(
00046 'label' => Mage::helper('catalog')->__('Save Attribute Set'),
00047 'onclick' => 'addSet.submit();',
00048 'class' => 'save'
00049 )));
00050 $this->setChild('back_button',
00051 $this->getLayout()->createBlock('adminhtml/widget_button')
00052 ->setData(array(
00053 'label' => Mage::helper('catalog')->__('Back'),
00054 'onclick' => 'setLocation(\''.$this->getUrl('*/*/').'\')',
00055 'class' => 'back'
00056 )));
00057
00058 $this->setChild('setForm',
00059 $this->getLayout()->createBlock('adminhtml/catalog_product_attribute_set_main_formset')
00060 );
00061 return parent::_prepareLayout();
00062 }
00063
00064 protected function _getHeader()
00065 {
00066 return Mage::helper('catalog')->__('Add New Attribute Set');
00067 }
00068
00069 protected function getSaveButtonHtml()
00070 {
00071 return $this->getChildHtml('save_button');
00072 }
00073
00074 protected function getBackButtonHtml()
00075 {
00076 return $this->getChildHtml('back_button');
00077 }
00078
00079 protected function getFormHtml()
00080 {
00081 return $this->getChildHtml('setForm');
00082 }
00083
00084 protected function getFormId()
00085 {
00086 return $this->getChild('setForm')->getForm()->getId();
00087 }
00088 }