<?

class Sinistro2_Form_UploadArquivoProcesso extends Agro_Form {
	public $id_proposta;
	public $arquivo;
	public $id_tipo_arquivo;
	
	public function init() {

		$this->id_processo = $this->createElement('hidden', 'id_processo');
		$this->id_processo->setDecorators($this->buttonDecorator);
		$this->id_processo->setRequired(true);
		$this->addElement($this->id_processo);
		
		$this->id_arquivo = $this->createElement('hidden', 'id_arquivo');
		$this->id_arquivo->setDecorators($this->buttonDecorator);
		$this->id_arquivo->setRequired(false);
		$this->addElement($this->id_arquivo);
		
		$this->arquivo = $this->createElement('file','arquivo');
		$this->arquivo->setDestination(APPLICATION_PATH . '/upload_files/sinistro_processo/');
		$this->arquivo->setLabel('Arquivo');
		$this->arquivo->setRequired(true);
		$this->addElement($this->arquivo);
		
		$TipoArquivoProcesso = new Sistema_Model_TipoArquivoProcesso();
		$this->id_tipo_arquivo = $this->createElement('select', 'id_tipo_arquivo');
		$this->id_tipo_arquivo->addMultiOptions($TipoArquivoProcesso->getCombo(false));
		$this->id_tipo_arquivo->setRequired(true);
		$this->id_tipo_arquivo->setLabel('Tipo');
		$this->addElement($this->id_tipo_arquivo);
	}
}