Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_System Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_System:

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.

Protected Member Functions

 _prepareForm ()


Detailed Description

Definition at line 35 of file System.php.


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 38 of file System.php.

00039     {
00040         $model = Mage::registry('entity_attribute');
00041 
00042         $form = new Varien_Data_Form();
00043         $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('catalog')->__('System Properties')));
00044 
00045         if ($model->getAttributeId()) {
00046             $fieldset->addField('attribute_id', 'hidden', array(
00047                 'name' => 'attribute_id',
00048             ));
00049         }
00050 
00051         $yesno = array(
00052             array(
00053                 'value' => 0,
00054                 'label' => Mage::helper('catalog')->__('No')
00055             ),
00056             array(
00057                 'value' => 1,
00058                 'label' => Mage::helper('catalog')->__('Yes')
00059             ));
00060 
00061         /*$fieldset->addField('attribute_model', 'text', array(
00062             'name' => 'attribute_model',
00063             'label' => Mage::helper('catalog')->__('Attribute Model'),
00064             'title' => Mage::helper('catalog')->__('Attribute Model'),
00065         ));
00066 
00067         $fieldset->addField('backend_model', 'text', array(
00068             'name' => 'backend_model',
00069             'label' => Mage::helper('catalog')->__('Backend Model'),
00070             'title' => Mage::helper('catalog')->__('Backend Model'),
00071         ));*/
00072 
00073         $fieldset->addField('backend_type', 'select', array(
00074             'name' => 'backend_type',
00075             'label' => Mage::helper('catalog')->__('Data Type for Saving in Database'),
00076             'title' => Mage::helper('catalog')->__('Data Type for Saving in Database'),
00077             'options' => array(
00078                 'text'      => Mage::helper('catalog')->__('Text'),
00079                 'varchar'   => Mage::helper('catalog')->__('Varchar'),
00080                 'static'    => Mage::helper('catalog')->__('Static'),
00081                 'datetime'  => Mage::helper('catalog')->__('Datetime'),
00082                 'decimal'   => Mage::helper('catalog')->__('Decimal'),
00083                 'int'       => Mage::helper('catalog')->__('Integer'),
00084             ),
00085         ));
00086 
00087         /*$fieldset->addField('backend_table', 'text', array(
00088             'name' => 'backend_table',
00089             'label' => Mage::helper('catalog')->__('Backend Table'),
00090             'title' => Mage::helper('catalog')->__('Backend Table Title'),
00091         ));
00092 
00093         $fieldset->addField('frontend_model', 'text', array(
00094             'name' => 'frontend_model',
00095             'label' => Mage::helper('catalog')->__('Frontend Model'),
00096             'title' => Mage::helper('catalog')->__('Frontend Model'),
00097         ));*/
00098 
00099         /*$fieldset->addField('is_visible', 'select', array(
00100             'name' => 'is_visible',
00101             'label' => Mage::helper('catalog')->__('Visible'),
00102             'title' => Mage::helper('catalog')->__('Visible'),
00103             'values' => $yesno,
00104         ));*/
00105 
00106         /*$fieldset->addField('source_model', 'text', array(
00107             'name' => 'source_model',
00108             'label' => Mage::helper('catalog')->__('Source Model'),
00109             'title' => Mage::helper('catalog')->__('Source Model'),
00110         ));*/
00111 
00112         $fieldset->addField('is_global', 'select', array(
00113             'name'  => 'is_global',
00114             'label' => Mage::helper('catalog')->__('Globally Editable'),
00115             'title' => Mage::helper('catalog')->__('Globally Editable'),
00116             'values'=> $yesno,
00117         ));
00118 
00119         $form->setValues($model->getData());
00120 
00121         if ($model->getAttributeId()) {
00122             $form->getElement('backend_type')->setDisabled(1);
00123             if ($model->getIsGlobal()) {
00124                 #$form->getElement('is_global')->setDisabled(1);
00125             }
00126         } else {
00127         }
00128 
00129         $this->setForm($form);
00130 
00131         return parent::_prepareForm();
00132     }


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

Generated on Sat Jul 4 17:22:43 2009 for Magento by  doxygen 1.5.8