1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25:
26:
27: 28: 29: 30: 31: 32: 33:
34:
35: class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Front extends Mage_Adminhtml_Block_Widget_Form
36: {
37:
38: protected function _prepareForm()
39: {
40: $model = Mage::registry('entity_attribute');
41:
42: $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post'));
43:
44: $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('catalog')->__('Frontend Properties')));
45:
46: $yesno = array(
47: array(
48: 'value' => 0,
49: 'label' => Mage::helper('catalog')->__('No')
50: ),
51: array(
52: 'value' => 1,
53: 'label' => Mage::helper('catalog')->__('Yes')
54: ));
55:
56:
57: $fieldset->addField('is_searchable', 'select', array(
58: 'name' => 'is_searchable',
59: 'label' => Mage::helper('catalog')->__('Use in Quick Search'),
60: 'title' => Mage::helper('catalog')->__('Use in Quick Search'),
61: 'values' => $yesno,
62: ));
63:
64: $fieldset->addField('is_visible_in_advanced_search', 'select', array(
65: 'name' => 'is_visible_in_advanced_search',
66: 'label' => Mage::helper('catalog')->__('Use in Advanced Search'),
67: 'title' => Mage::helper('catalog')->__('Use in Advanced Search'),
68: 'values' => $yesno,
69: ));
70:
71: $fieldset->addField('is_comparable', 'select', array(
72: 'name' => 'is_comparable',
73: 'label' => Mage::helper('catalog')->__('Comparable on the Frontend'),
74: 'title' => Mage::helper('catalog')->__('Comparable on the Frontend'),
75: 'values' => $yesno,
76: ));
77:
78:
79: $fieldset->addField('is_filterable', 'select', array(
80: 'name' => 'is_filterable',
81: 'label' => Mage::helper('catalog')->__("Use in Layered Navigation<br/>(Can be used only with catalog input type 'Dropdown')"),
82: 'title' => Mage::helper('catalog')->__('Can be used only with catalog input type Dropdown'),
83: 'values' => array(
84: array('value' => '0', 'label' => Mage::helper('catalog')->__('No')),
85: array('value' => '1', 'label' => Mage::helper('catalog')->__('Filterable (with results)')),
86: array('value' => '2', 'label' => Mage::helper('catalog')->__('Filterable (no results)')),
87: ),
88: ));
89:
90:
91: $fieldset->addField('is_visible_on_front', 'select', array(
92: 'name' => 'is_visible_on_front',
93: 'label' => Mage::helper('catalog')->__('Visible on Catalog Pages on Front-end'),
94: 'title' => Mage::helper('catalog')->__('Visible on Catalog Pages on Front-end'),
95: 'values' => $yesno,
96: ));
97:
98:
99: $form->setValues($model->getData());
100:
101: $this->setForm($form);
102:
103: return parent::_prepareForm();
104: }
105:
106: }
107: