<div id="divPendenciasRegulacaoLaudos" title="Cadastrar arquivos das pendência">
	<fieldset>
        <input type="hidden" id="idProcessoArquivoPendencia" value="<?=$this->processoArquivoPendencia['id']?>">
        <table>
            <tr>
                <td colspan="2">
                    <div class="field">
                        <?php if(empty($this->processoArquivoPendencia['id'])) {?>
                            <input type="hidden" name="MAX_FILE_SIZE" value="2097152" id="MAX_FILE_SIZE">
                            <label for="documento1" class="required">
                                <b>Arquivo(s)</b>
                            
                                    <span class="add">
                                        <a class="addFile" href="#">
                                            <img alt="Adicionar Anexo" title="Adicionar Anexo" src="/resources/imagens/mini/add_att_16x16.gif" border="0">
                                        </a>
                                    </span>
                            </label>
                            <br><br>
                            <input class="input_documento" type="file" name="documentos[]" id="documento1" size="40" value="">
                        <?php } else {?>
                            <label for="documento1">
                                <b>Arquivo: </b>
                            </label>
                            <input class="input_documento" type="file" name="documentos[]" id="documento1" size="40" value="">
                            <br><br>
                            <a href="/agronet/file/processosarquivospendencias/id/<?=$this->processoArquivoPendencia["id"]?>">
                                <img src="/resources/imagens/mini/download.png" alt="download.png" title="Download">
                                Clique aqui para fazer o download do arquivo
                            </a>
                        <?php }?>
                    </div>
                    <br>
                    <span class="documentos" style="display: block; width:350px;"></span>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="field">
                        <label for="cbxTipoDocumentos" class="required">Tipo:</label>
                        <select id="cbxTipoDocumentos">
                            <option value="0">
                                Selecione o tipo de documento...
                            </option>
                            <option value="<?=Sinistro2_Model_ProcessosArquivosPendencias::TIPO_DECLARAÇÃO_PRELIMINAR?>" <?=(Sinistro2_Model_ProcessosArquivosPendencias::TIPO_DECLARAÇÃO_PRELIMINAR == $this->processoArquivoPendencia['nr_tipo']) ? 'selected' : '' ?>>
                                DECLARAÇÃO PRELIMINAR
                            </option>
                            <option value="<?=Sinistro2_Model_ProcessosArquivosPendencias::TIPO_DECLARAÇÃO_FINAL?>" <?=(Sinistro2_Model_ProcessosArquivosPendencias::TIPO_DECLARAÇÃO_FINAL == $this->processoArquivoPendencia['nr_tipo']) ? 'selected' : '' ?>>
                                DECLARAÇÃO FINAL
                            </option>
                            <option value="<?=Sinistro2_Model_ProcessosArquivosPendencias::TIPO_AUTORIZAÇÃO_FINAL?>" <?=(Sinistro2_Model_ProcessosArquivosPendencias::TIPO_AUTORIZAÇÃO_FINAL == $this->processoArquivoPendencia['nr_tipo']) ? 'selected' : '' ?>>
                                AUTORIZAÇÃO FINAL
                            </option>
                            <option value="<?=Sinistro2_Model_ProcessosArquivosPendencias::TIPO_AUTORIZAÇÃO_PRELIMINAR?>" <?=(Sinistro2_Model_ProcessosArquivosPendencias::TIPO_AUTORIZAÇÃO_PRELIMINAR == $this->processoArquivoPendencia['nr_tipo']) ? 'selected' : '' ?>>
                                AUTORIZAÇÃO PRELIMINAR
                            </option>
                            <option value="<?=Sinistro2_Model_ProcessosArquivosPendencias::TIPO_LAUDO_PARCIAL_FINAL?>" <?=(Sinistro2_Model_ProcessosArquivosPendencias::TIPO_LAUDO_PARCIAL_FINAL == $this->processoArquivoPendencia['nr_tipo']) ? 'selected' : '' ?>>
                                LAUDO PARCIAL FINAL
                            </option>
                            <option value="<?=Sinistro2_Model_ProcessosArquivosPendencias::TIPO_LAUDO_FINAL?>" <?=(Sinistro2_Model_ProcessosArquivosPendencias::TIPO_LAUDO_FINAL == $this->processoArquivoPendencia['nr_tipo']) ? 'selected' : '' ?>>
                                LAUDO FINAL
                            </option>
                            <option value="<?=Sinistro2_Model_ProcessosArquivosPendencias::TIPO_LAUDO_PRELIMINAR?>" <?=(Sinistro2_Model_ProcessosArquivosPendencias::TIPO_LAUDO_PRELIMINAR == $this->processoArquivoPendencia['nr_tipo']) ? 'selected' : '' ?>>
                                LAUDO PRELIMINAR
                            </option>
                        </select>
                    </div>
                </td>
                <td>
                    <div id="divItens" class="field <?=(!empty($this->processoArquivoPendencia['nr_item_segurado']) ? '' : 'hide')?>">
                        <label id="labelItemDocumento" for="cbxItemDocumento" class="required">Item:</label>
                        <select id="cbxItemDocumento">
                            <option value="0">Selecione o item...</option>
                            <?php foreach($this->itensSeguradosProposta as $itemSeguradoProposta){ ?>
                                <option value="<?=$itemSeguradoProposta['nr_item_segurado']?>" <?=($itemSeguradoProposta['nr_item_segurado'] == $this->processoArquivoPendencia['nr_item_segurado']) ? 'selected' : ''?> ><?=$itemSeguradoProposta['nr_item_segurado']?></option>
                            <?}?>
                        </select>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div class="field">
                        <? if (Sistema_Model_Usuarios::usuarioLogadoFuncionarioAgro()) {?>
                            <label for="empresaPendenciaRegulacaoLaudos" class="required">Empresa:</label>
                            <select id="empresaPendenciaRegulacaoLaudos" <?=(($this->permiteEditarEmpresa) ? '' : 'disabled')?>>
                                <?  if (count($this->empresasProcesso) == 1) { ?>
                                        <option value="<?=$this->empresasProcesso[0]['id_empresa']?>"><?=$this->empresasProcesso[0]['ds_nome_fantasia']?></option>
                                <?  } else { ?>
                                        <option value="0">Selecione a empresa...</option>
                                <?		foreach ($this->empresasProcesso as $empresaProcesso) { ?>
                                            <option value="<?=$empresaProcesso['id_empresa']?>" <?=($empresaProcesso['id_empresa'] == $this->processoArquivoPendencia['id_empresa']) ? 'selected' : '' ?>>
                                                <?=$empresaProcesso['ds_nome_fantasia']?>
                                            </option>
                                <?		}
                                    }
                                ?>
                            </select>
                        <? } else { ?>
                            <input type="hidden" id="empresaPendenciaRegulacaoLaudos" value="<?=$this->idEmpresaUserLogado?>">
                        <? } ?>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div class="field">
                        <label for="cbxStatusPendenciaRegulacaoLaudos" class="required">Status:</label>
                        <select id="cbxStatusPendenciaRegulacaoLaudos" <?=(Sistema_Model_Usuarios::usuarioLogadoFuncionarioAgro()) ? '' : 'disabled'?>>
                            <?php foreach ($this->statusPendenciasRegulacaoLaudos as $idStatus => $status) { ?>
                                <option value="<?=$idStatus?>" <?=($idStatus == $this->processoArquivoPendencia['id_status']) ? 'selected' : '' ?>>
                                    <?=$status?>
                                </option>
                            <? } ?>
                        </select>
                    </div>
                </td>
            </tr>
        </table>
	</fieldset>
</div>