<?

class Atendimento_Form_TipoPendencia extends Agro_Form {
	
	public function init() {
		$this->id = $this->createElement('hidden', 'id');
		$this->id->setDecorators($this->buttonDecorator);
		$this->addElement($this->id);
		
		$this->ds_tipo_pendencia = $this->createElement('text', 'ds_tipo_pendencia');
		$this->ds_tipo_pendencia->setDecorators($this->elementDecorator);
		$this->ds_tipo_pendencia->setRequired(true);
		$this->ds_tipo_pendencia->setAttrib('size', '50');
		$this->ds_tipo_pendencia->setAttrib('maxlength', '100');
		$this->ds_tipo_pendencia->setLabel('Descrição');
		$this->addElement($this->ds_tipo_pendencia);

		
		$this->ds_chave = $this->createElement('text', 'ds_chave');
		$this->ds_chave->setDecorators($this->elementDecorator);
		$this->ds_chave->setRequired(true);
		$this->ds_chave->setAttrib('size', '50');
		$this->ds_chave->setAttrib('maxlength', '100');
		$this->ds_chave->setLabel('Chave');
		$this->addElement($this->ds_chave);
		
		
		$this->save = $this->createElement('button', 'salvar', array('type'=>'submit'));
		$this->save->setDecorators($this->buttonDecorator);
		$this->save->setDecorators($this->buttonDecorator);
		$this->save->setLabel('Salvar');
		$this->addElement($this->save);
		
		$this->cancel = $this->createElement('button', 'cancelar', array('onclick'=>"location.href='/atendimento/tipopendencia'"));
		$this->cancel->setDecorators($this->buttonDecorator);
		$this->cancel->setLabel('Cancelar');
		$this->addElement($this->cancel);
	}
}