Public Member Functions | |
__construct () | |
Protected Member Functions | |
_prepareForm () |
Definition at line 33 of file Formattribute.php.
__construct | ( | ) |
Class constructor
Reimplemented from Mage_Adminhtml_Block_Widget_Form.
Definition at line 35 of file Formattribute.php.
00036 { 00037 parent::__construct(); 00038 }
_prepareForm | ( | ) | [protected] |
Prepare form before rendering HTML
Reimplemented from Mage_Adminhtml_Block_Widget_Form.
Definition at line 40 of file Formattribute.php.
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 }