<?

class Produto_Form_Ciclos extends Agro_Form {
	public $id;
	public $ds_nome_ciclo;
	
	public function init() {
		$this->id = $this->createElement('hidden', 'id');
		$this->id->setDecorators($this->buttonDecorator);
		$this->addElement($this->id);
		
		$this->ds_nome_ciclo = $this->createElement('text', 'ds_nome_ciclo');
		$this->ds_nome_ciclo->setDecorators($this->elementDecorator);
		$this->ds_nome_ciclo->setRequired(true);
		$this->ds_nome_ciclo->setAttrib('size', '50');
		$this->ds_nome_ciclo->setAttrib('maxlength', '40');
		$this->ds_nome_ciclo->setLabel('Nome');
		$this->addElement($this->ds_nome_ciclo);
		
		$this->cd_ciclo_seguradora = $this->createElement('text', 'cd_ciclo_seguradora');
		$this->cd_ciclo_seguradora->setDecorators($this->elementDecorator);
		$this->cd_ciclo_seguradora->setAttrib('size', '11');
		$this->cd_ciclo_seguradora->setAttrib('maxlength', '10');
		$this->cd_ciclo_seguradora->setAttrib('class', 'integer');
		$this->cd_ciclo_seguradora->setLabel('Código da Seguradora');
		$this->addElement($this->cd_ciclo_seguradora);
		
		$this->ds_chave_ciclo = $this->createElement('text', 'ds_chave_ciclo');
		$this->ds_chave_ciclo->setDecorators($this->elementDecorator);
		$this->ds_chave_ciclo->setAttrib('size', '11');
		$this->ds_chave_ciclo->setAttrib('maxlength', '10');
		$this->ds_chave_ciclo->setAttrib('class', 'integer');
		$this->ds_chave_ciclo->setLabel('Chave');
		$this->addElement($this->ds_chave_ciclo);
		
		$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/ciclos'"));
		$this->cancel->setDecorators($this->buttonDecorator);
		$this->cancel->setLabel('Cancelar');
		$this->addElement($this->cancel);
	}
}