-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tarefa.php
executable file
·42 lines (32 loc) · 1.18 KB
/
Tarefa.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
class Form_Tarefa extends Zend_Form
{
public function init()
{
$this->setName('Tarefa');
$id = new Zend_Form_Element_Hidden('id');
$id->addFilter('Int');
$nome = new Zend_Form_Element_Text('nome');
$nome->setLabel('Nome')
->setRequired(true)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty');
$custo = new Zend_Form_Element_Text('custo');
$custo->setLabel('Custo')
->setRequired(true)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty');
$passo = new Zend_Form_Element_Text('passo');
$passo->setLabel('Passo')
->setRequired(true)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty');
$submit = new Zend_Form_Element_Submit('submit');
$submit->setAttrib('id', 'submitbutton');
$submit->setAttrib('class', 'btn btn-primary');
$this->addElements(array($id, $nome, $custo, $passo, $submit));
}
}