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: class Mage_Adminhtml_Block_Permissions_Tab_Roleinfo extends Mage_Adminhtml_Block_Widget_Form implements Mage_Adminhtml_Block_Widget_Tab_Interface
32: {
33: public function getTabLabel()
34: {
35: return Mage::helper('adminhtml')->__('Role Info');
36: }
37:
38: public function getTabTitle()
39: {
40: return $this->getTabLabel();
41: }
42:
43: public function canShowTab()
44: {
45: return true;
46: }
47:
48: public function isHidden()
49: {
50: return false;
51: }
52:
53: public function _beforeToHtml() {
54: $this->_initForm();
55:
56: return parent::_beforeToHtml();
57: }
58:
59: protected function _initForm()
60: {
61: $roleId = $this->getRequest()->getParam('rid');
62:
63: $form = new Varien_Data_Form();
64:
65: $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('adminhtml')->__('Role Information')));
66:
67: $fieldset->addField('role_name', 'text',
68: array(
69: 'name' => 'rolename',
70: 'label' => Mage::helper('adminhtml')->__('Role Name'),
71: 'id' => 'role_name',
72: 'class' => 'required-entry',
73: 'required' => true,
74: )
75: );
76:
77: $fieldset->addField('role_id', 'hidden',
78: array(
79: 'name' => 'role_id',
80: 'id' => 'role_id',
81: )
82: );
83:
84: $fieldset->addField('in_role_user', 'hidden',
85: array(
86: 'name' => 'in_role_user',
87: 'id' => 'in_role_userz',
88: )
89: );
90:
91: $fieldset->addField('in_role_user_old', 'hidden', array('name' => 'in_role_user_old'));
92:
93: $form->setValues($this->getRole()->getData());
94: $this->setForm($form);
95: }
96: }
97: