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
00034
00035 class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Front extends Mage_Adminhtml_Block_Widget_Form
00036 {
00037
00038 protected function _prepareForm()
00039 {
00040 $model = Mage::registry('entity_attribute');
00041
00042 $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post'));
00043
00044 $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('catalog')->__('Frontend Properties')));
00045
00046 $yesno = array(
00047 array(
00048 'value' => 0,
00049 'label' => Mage::helper('catalog')->__('No')
00050 ),
00051 array(
00052 'value' => 1,
00053 'label' => Mage::helper('catalog')->__('Yes')
00054 ));
00055
00056
00057 $fieldset->addField('is_searchable', 'select', array(
00058 'name' => 'is_searchable',
00059 'label' => Mage::helper('catalog')->__('Use in quick search'),
00060 'title' => Mage::helper('catalog')->__('Use in quick search'),
00061 'values' => $yesno,
00062 ));
00063
00064 $fieldset->addField('is_visible_in_advanced_search', 'select', array(
00065 'name' => 'is_visible_in_advanced_search',
00066 'label' => Mage::helper('catalog')->__('Use in advanced search'),
00067 'title' => Mage::helper('catalog')->__('Use in advanced search'),
00068 'values' => $yesno,
00069 ));
00070
00071 $fieldset->addField('is_comparable', 'select', array(
00072 'name' => 'is_comparable',
00073 'label' => Mage::helper('catalog')->__('Comparable on Front-end'),
00074 'title' => Mage::helper('catalog')->__('Comparable on Front-end'),
00075 'values' => $yesno,
00076 ));
00077
00078
00079 $fieldset->addField('is_filterable', 'select', array(
00080 'name' => 'is_filterable',
00081 'label' => Mage::helper('catalog')->__("Use In Layered Navigation<br/>(Can be used only with catalog input type 'Dropdown')"),
00082 'title' => Mage::helper('catalog')->__('Can be used only with catalog input type Dropdown'),
00083 'values' => array(
00084 array('value' => '0', 'label' => Mage::helper('catalog')->__('No')),
00085 array('value' => '1', 'label' => Mage::helper('catalog')->__('Filterable (with results)')),
00086 array('value' => '2', 'label' => Mage::helper('catalog')->__('Filterable (no results)')),
00087 ),
00088 ));
00089
00090
00091 $fieldset->addField('is_visible_on_front', 'select', array(
00092 'name' => 'is_visible_on_front',
00093 'label' => Mage::helper('catalog')->__('Visible on Catalog Pages on Front-end'),
00094 'title' => Mage::helper('catalog')->__('Visible on Catalog Pages on Front-end'),
00095 'values' => $yesno,
00096 ));
00097
00098
00099 $form->setValues($model->getData());
00100
00101 $this->setForm($form);
00102
00103 return parent::_prepareForm();
00104 }
00105
00106 }