Mage_Adminhtml_Block_Tax_Class_Edit_Form Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Tax_Class_Edit_Form:

Mage_Adminhtml_Block_Widget_Form Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()

Protected Member Functions

 _prepareForm ()


Detailed Description

Definition at line 35 of file Form.php.


Constructor & Destructor Documentation

__construct (  ) 

Class constructor

Reimplemented from Mage_Adminhtml_Block_Widget_Form.

Definition at line 37 of file Form.php.

00038     {
00039         parent::__construct();
00040 
00041         $this->setId('taxClassForm');
00042     }


Member Function Documentation

_prepareForm (  )  [protected]

Prepare form before rendering HTML

Returns:
Mage_Adminhtml_Block_Widget_Form

Reimplemented from Mage_Adminhtml_Block_Widget_Form.

Definition at line 44 of file Form.php.

00045     {
00046         $model  = Mage::registry('tax_class');
00047         $form   = new Varien_Data_Form(array(
00048             'id'        => 'edit_form',
00049             'action'    => $this->getData('action'),
00050             'method'    => 'post'
00051         ));
00052 
00053         $classType  = $this->getClassType();
00054 
00055         $this->setTitle($classType == 'CUSTOMER'
00056             ? Mage::helper('cms')->__('Customer Tax Class Information')
00057             : Mage::helper('cms')->__('Product Tax Class Information')
00058         );
00059 
00060         $fieldset   = $form->addFieldset('base_fieldset', array(
00061             'legend'    => $classType == 'CUSTOMER'
00062                 ? Mage::helper('tax')->__('Customer Tax Class Information')
00063                 : Mage::helper('tax')->__('Product Tax Class Information')
00064         ));
00065 
00066         $fieldset->addField('class_name', 'text',
00067             array(
00068                 'name'  => 'class_name',
00069                 'label' => Mage::helper('tax')->__('Class Name'),
00070                 'class' => 'required-entry',
00071                 'value' => $model->getClassName(),
00072                 'required' => true,
00073             )
00074         );
00075 
00076         $fieldset->addField('class_type', 'hidden',
00077             array(
00078                 'name'      => 'class_type',
00079                 'value'     => $classType,
00080                 'no_span'   => true
00081             )
00082         );
00083 
00084         if ($model->getId()) {
00085             $fieldset->addField('class_id', 'hidden',
00086                 array(
00087                     'name'      => 'class_id',
00088                     'value'     => $model->getId(),
00089                     'no_span'   => true
00090                 )
00091             );
00092         }
00093 
00094         $form->setAction($this->getUrl('*/tax_class/save'));
00095         $form->setUseContainer(true);
00096         $this->setForm($form);
00097 
00098         return parent::_prepareForm();
00099     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:05 2009 for Magento by  doxygen 1.5.8