예제 #1
0
파일: Edit.php 프로젝트: br00k/tnc-web
 public function init()
 {
     parent::init();
     $this->setAction('/core/user/edit');
     $this->addElement('hidden', 'user_id', array('validators' => array(array('Int')), 'required' => true, 'decorators' => $this->_hiddenElementDecorator));
     $this->removeElement('password');
     $this->removeElement('passwordCheck');
     $this->removeElement('invite');
     // @todo: no longer needed
     $this->removeElement('role_id');
     // @todo: no longer needed
     $this->getElement('email')->setDescription(null);
     $this->getElement('organisation')->setRequired(true);
 }
예제 #2
0
파일: Invite.php 프로젝트: GEANT/CORE
 public function init()
 {
     parent::init();
     $uuid = new uuid();
     $invite = new Zend_Form_Element_Hidden('invite');
     $invite->setValue($uuid->get())->setRequired(true)->addValidator(new TA_Form_Validator_Uuid())->setDecorators(array('Composite'));
     $userModel = new Core_Model_User();
     $roles = new Zend_Form_Element_Select('role_id');
     $roles->setAttrib('class', 'small')->setLabel('Role')->setOrder(4)->addFilter('Null')->setMultiOptions($userModel->getRolesForSelect('---'))->setDecorators(array('Composite'));
     $this->addElements(array($roles, $invite));
 }