<?

class Produto_Form_Nomenclatura extends Agro_Form {
	public $id;
	public $ds_nomenclatura;
	
	public function init() {
		$this->id = $this->createElement('hidden', 'id');
		$this->id->setDecorators($this->buttonDecorator);
		$this->addElement($this->id);
		
		$this->ds_nomenclatura = $this->createElement('text', 'ds_nomenclatura');
		$this->ds_nomenclatura->setDecorators($this->elementDecorator);
		$this->ds_nomenclatura->setRequired(true);
		$this->ds_nomenclatura->setAttrib('size', '50');
		$this->ds_nomenclatura->setAttrib('maxlength', '40');
		$this->ds_nomenclatura->setLabel('Nome');
		$this->addElement($this->ds_nomenclatura);
		
		$this->ds_descricao_nomenclatura = $this->createElement('textarea', 'ds_descricao_nomenclatura');
		$this->ds_descricao_nomenclatura->setDecorators($this->elementDecorator);
		$this->ds_descricao_nomenclatura->setRequired(true);
		$this->ds_descricao_nomenclatura->setAttrib('cols','48');
		$this->ds_descricao_nomenclatura->setAttrib('rows','5');
		$this->ds_descricao_nomenclatura->setLabel('Descrição');
		$this->addElement($this->ds_descricao_nomenclatura);
		
		$this->save = $this->createElement('button', 'salvar', array('type'=>'submit'));
		$this->save->setDecorators($this->buttonDecorator);
		$this->save->setLabel('Salvar');
		$this->addElement($this->save);
		
		$this->cancel = $this->createElement('button', 'cancelar', array('onclick'=>"location.href='/produto/nomenclatura'"));
		$this->cancel->setDecorators($this->buttonDecorator);
		$this->cancel->setLabel('Cancelar');
		$this->addElement($this->cancel);
	}
}