<?

class Corretor_Form_Upload extends Agro_Form {
	
	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->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);
		
		$this->nota = $this->createElement('file','nota');
		$this->nota->setDestination(APPLICATION_PATH . '/upload_files/sinistro_processo/');
		$this->nota->setLabel('Arquivo de nota');
		$this->nota->setRequired(true);
		$this->addElement($this->nota);

		$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);
	}
}