summaryrefslogblamecommitdiffstats
path: root/application/modules/user/forms/LinkRight.php
blob: 8fe2f46f71df60a8eb9dec720e48013419eedbaf (plain) (tree)



















                                                 
                                                                                                                                                       





                                                                
                                





                                                            
                                                                                          





                   
<?php

class user_Form_LinkRight extends Zend_Form
{
	private $rightlist;
	private $roleID;

	public function setRightlist($rightlist){
		$this->rightlist = $rightlist;
	}

	public function setRoleID($roleID){
		$this->roleID = $roleID;
	}

	public function init()
	{
		$this->setName("LinkRight");
		$this->setMethod('post');

		$rightfield = $this->createElement('select','rightID',array('label'=> 'Right: ','required' => true,'multioptions'=> $this->rightlist));
		$rightfield->setRegisterInArrayValidator(false);
		$this->addElement($rightfield);

		$this->addElement('submit', 'link', array(
            'required' => false,
            'ignore'   => true,
            'label'    => 'Add',
		));

		$this->addElement('button', 'cancel', array(
            'required' => false,
            'ignore'   => true,
            'label'    => 'Cancel',
			'onclick'   => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"',
		));
	}


}