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 class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formattribute extends Mage_Adminhtml_Block_Widget_Form
00034 {
00035 public function __construct()
00036 {
00037 parent::__construct();
00038 }
00039
00040 protected function _prepareForm()
00041 {
00042 $form = new Varien_Data_Form();
00043
00044 $fieldset = $form->addFieldset('set_fieldset', array('legend'=>Mage::helper('catalog')->__('Add New Attribute')));
00045
00046 $fieldset->addField('new_attribute', 'text',
00047 array(
00048 'label' => Mage::helper('catalog')->__('Name'),
00049 'name' => 'new_attribute',
00050 'required' => true,
00051 )
00052 );
00053
00054 $fieldset->addField('submit', 'note',
00055 array(
00056 'text' => $this->getLayout()->createBlock('adminhtml/widget_button')
00057 ->setData(array(
00058 'label' => Mage::helper('catalog')->__('Add Attribute'),
00059 'onclick' => 'this.form.submit();',
00060 'class' => 'add'
00061 ))
00062 ->toHtml(),
00063 )
00064 );
00065
00066 $form->setUseContainer(true);
00067 $form->setMethod('post');
00068 $this->setForm($form);
00069 }
00070 }