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