Public Member Functions | |
__construct () | |
initForm () |
Definition at line 34 of file Package.php.
__construct | ( | ) |
Class constructor
Reimplemented from Mage_Adminhtml_Block_Extensions_Custom_Edit_Tab_Abstract.
Definition at line 38 of file Package.php.
00039 { 00040 parent::__construct(); 00041 $this->setTemplate('extensions/custom/package.phtml'); 00042 }
initForm | ( | ) |
Reimplemented from Mage_Adminhtml_Block_Extensions_Custom_Edit_Tab_Abstract.
Definition at line 44 of file Package.php.
00045 { 00046 $form = new Varien_Data_Form(); 00047 $form->setHtmlIdPrefix('_package'); 00048 00049 $fieldset = $form->addFieldset('package_fieldset', array('legend'=>Mage::helper('adminhtml')->__('Package'))); 00050 00051 if ($this->getData('name') != $this->getData('file_name')) { 00052 $this->setData('file_name_disabled', $this->getData('file_name')); 00053 $fieldset->addField('file_name_disabled', 'text', array( 00054 'name' => 'file_name_disabled', 00055 'label' => Mage::helper('adminhtml')->__('Package File Name'), 00056 'disabled' => 'disabled', 00057 )); 00058 } 00059 00060 $fieldset->addField('file_name', 'hidden', array( 00061 'name' => 'file_name', 00062 )); 00063 00064 $fieldset->addField('name', 'text', array( 00065 'name' => 'name', 00066 'label' => Mage::helper('adminhtml')->__('Name'), 00067 'required' => true, 00068 )); 00069 00070 $fieldset->addField('channel', 'text', array( 00071 'name' => 'channel', 00072 'label' => Mage::helper('adminhtml')->__('Channel'), 00073 'required' => true, 00074 )); 00075 00076 $fieldset->addField('summary', 'textarea', array( 00077 'name' => 'summary', 00078 'label' => Mage::helper('adminhtml')->__('Summary'), 00079 'style' => 'height:50px;', 00080 'required' => true, 00081 )); 00082 00083 $fieldset->addField('description', 'textarea', array( 00084 'name' => 'description', 00085 'label' => Mage::helper('adminhtml')->__('Description'), 00086 'style' => 'height:200px;', 00087 'required' => true, 00088 )); 00089 00090 $fieldset->addField('license', 'text', array( 00091 'name' => 'license', 00092 'label' => Mage::helper('adminhtml')->__('License'), 00093 'required' => true, 00094 'value' => 'Open Software License (OSL 3.0)', 00095 )); 00096 00097 $fieldset->addField('license_uri', 'text', array( 00098 'name' => 'license_uri', 00099 'label' => Mage::helper('adminhtml')->__('License URI'), 00100 'value' => 'http://opensource.org/licenses/osl-3.0.php', 00101 )); 00102 00103 $form->setValues($this->getData()); 00104 00105 $this->setForm($form); 00106 00107 return $this; 00108 }