<?

class Sinistro_Form_DadosPagamento extends Agro_Form {
	
	public function init() {
		$this->id_liquidacao = $this->createElement('hidden', 'id_liquidacao');
		$this->id_liquidacao->setAttrib('id', 'id_liquidacao');
		$this->id_liquidacao->setDecorators($this->buttonDecorator);
		$this->addElement($this->id_liquidacao);
		
		$this->dt_pagamento = $this->createElement('text', 'dt_pagamento');
		$this->dt_pagamento->setDecorators($this->elementDecorator);
		$this->dt_pagamento->setRequired(true);
		$this->dt_pagamento->setAttrib('class', 'data');
		$this->dt_pagamento->setLabel('Data Prevista para Pagamento');
		$this->addElement($this->dt_pagamento);
		
		$this->dt_confirmacao_pagamento = $this->createElement('text', 'dt_confirmacao_pagamento');
		$this->dt_confirmacao_pagamento->setDecorators($this->elementDecorator);
		$this->dt_confirmacao_pagamento->setRequired(false);
		$this->dt_confirmacao_pagamento->setAttrib('class', 'data');
		$this->dt_confirmacao_pagamento->setLabel('Confirmação do Pagamento');
		$this->addElement($this->dt_confirmacao_pagamento);		
		

		$this->vl_pagamento = $this->createElement('text', 'vl_pagamento');
		$this->vl_pagamento->setDecorators($this->elementDecorator);
		$this->vl_pagamento->setRequired(true);
		$this->vl_pagamento->setAttrib('class', 'currency');
		$this->vl_pagamento->setLabel('Valor do Pagamento');
		$this->addElement($this->vl_pagamento);		
		
		
		$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/pendencia'"));
		$this->cancel->setDecorators($this->buttonDecorator);
		$this->cancel->setLabel('Cancelar');
		$this->addElement($this->cancel);
		
	}
}