projet.php

来自「Bug tracker, and reporter.」· PHP 代码 · 共 47 行

PHP
47
字号
<?phpclass Form_Projet extends Zend_Form{		public function __construct($options = null,$edit = null){				parent::__construct($options);		$this->setName('projet');		$nom = new Zend_Form_Element_Text('nom');		$nom -> setLabel('Nom')		->setRequired(true)		->setValue($edit['nom']);		$nom-> addValidator('NotEmpty');				$description = new Zend_Form_Element_Textarea('description',array('rows' => '6','cols' => '60'));		$description -> setLabel('Description')		->setRequired(true)		->setValue($edit['description']);		$description->addValidator('NotEmpty');				$submit = new Zend_Form_Element_Submit('submit');		$submit->setLabel($edit['submit']);		$this->addElements(array($nom, $description, $submit));		$this->clearDecorators();		$this->addDecorator('FormElements')		->addDecorator('HtmlTag', array('tag' => '<fieldset>'))		->addDecorator('Form');		$this->setElementDecorators(array(		array('ViewHelper'),		array('Errors',array('class'=>'error')),		array('Label', array('separator'=>' ')),		array('HtmlTag', array('tag' => 'p', 'class'=>'form_element')),		));		// buttons do not need labels		$submit->setDecorators(array(		array('ViewHelper'),		array('HtmlTag', array('tag' => 'p', 'class'=>'submit')),		));	}}?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?