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 class Mage_Adminhtml_Block_Permissions_Tab_Roleinfo extends Mage_Adminhtml_Block_Widget_Form implements Mage_Adminhtml_Block_Widget_Tab_Interface
00032 {
00033 public function getTabLabel()
00034 {
00035 return Mage::helper('adminhtml')->__('Role Info');
00036 }
00037
00038 public function getTabTitle()
00039 {
00040 return $this->getTabLabel();
00041 }
00042
00043 public function canShowTab()
00044 {
00045 return true;
00046 }
00047
00048 public function isHidden()
00049 {
00050 return false;
00051 }
00052
00053 public function _beforeToHtml() {
00054 $this->_initForm();
00055
00056 return parent::_beforeToHtml();
00057 }
00058
00059 protected function _initForm()
00060 {
00061 $roleId = $this->getRequest()->getParam('rid');
00062
00063 $form = new Varien_Data_Form();
00064
00065 $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('adminhtml')->__('Role Information')));
00066
00067 $fieldset->addField('role_name', 'text',
00068 array(
00069 'name' => 'rolename',
00070 'label' => Mage::helper('adminhtml')->__('Role Name'),
00071 'id' => 'role_name',
00072 'class' => 'required-entry',
00073 'required' => true,
00074 )
00075 );
00076
00077 $fieldset->addField('role_id', 'hidden',
00078 array(
00079 'name' => 'role_id',
00080 'id' => 'role_id',
00081 )
00082 );
00083
00084 $fieldset->addField('in_role_user', 'hidden',
00085 array(
00086 'name' => 'in_role_user',
00087 'id' => 'in_role_userz',
00088 )
00089 );
00090
00091 $form->setValues($this->getRole()->getData());
00092 $this->setForm($form);
00093 }
00094 }