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: class Mage_Index_Block_Adminhtml_Process_Edit_Tab_Main
28: extends Mage_Adminhtml_Block_Widget_Form
29: implements Mage_Adminhtml_Block_Widget_Tab_Interface
30: {
31: protected function _prepareForm()
32: {
33: $model = Mage::registry('current_index_process');
34: $form = new Varien_Data_Form();
35: $form->setHtmlIdPrefix('index_process_');
36: $fieldset = $form->addFieldset(
37: 'base_fieldset',
38: array('legend'=>Mage::helper('index')->__('General'), 'class'=>'fieldset-wide')
39: );
40:
41: $fieldset->addField('process_id', 'hidden', array('name' => 'process', 'value'=>$model->getId()));
42:
43: $fieldset->addField('name', 'note', array(
44: 'label' => Mage::helper('index')->__('Index Name'),
45: 'title' => Mage::helper('index')->__('Index Name'),
46: 'text' => '<strong>'.$model->getIndexer()->getName().'</strong>'
47: ));
48:
49: $fieldset->addField('description', 'note', array(
50: 'label' => Mage::helper('index')->__('Index Description'),
51: 'title' => Mage::helper('index')->__('Index Description'),
52: 'text' => $model->getIndexer()->getDescription()
53: ));
54:
55: $fieldset->addField('mode', 'select', array(
56: 'label' => Mage::helper('index')->__('Index Mode'),
57: 'title' => Mage::helper('index')->__('Index Mode'),
58: 'name' => 'mode',
59: 'value' => $model->getMode(),
60: 'values'=> $model->getModesOptions()
61: ));
62:
63:
64: $this->setForm($form);
65: return parent::_prepareForm();
66: }
67:
68: 69: 70: 71: 72:
73: public function getTabLabel()
74: {
75: return Mage::helper('index')->__('Process Information');
76: }
77:
78: 79: 80: 81: 82:
83: public function getTabTitle()
84: {
85: return Mage::helper('index')->__('Process Information');
86: }
87:
88: 89: 90: 91: 92:
93: public function canShowTab()
94: {
95: return true;
96: }
97:
98: 99: 100: 101: 102:
103: public function isHidden()
104: {
105: return false;
106: }
107:
108: 109: 110: 111: 112: 113:
114: protected function _isAllowedAction($action)
115: {
116: return true;
117: }
118: }
119: