mirror of https://github.com/interlegis/sapl.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
3.6 KiB
89 lines
3.6 KiB
{% extends "crud/detail.html" %}
|
|
{% load i18n crispy_forms_tags %}
|
|
{% block actions %}{% endblock %}
|
|
|
|
{% block detail_content %}
|
|
{% if not show_results %}
|
|
{% crispy filter.form %}
|
|
{% endif %}
|
|
{% if show_results %}
|
|
{% if numero_res > 0 %}
|
|
{% if numero_res == 1 %}
|
|
<h3 style="text-align: right;">{% trans 'Pesquisa concluída com sucesso! Foi encontrada 1 documento.'%}</h3>
|
|
{% else %}
|
|
<h3 style="text-align: right;">Foram encontrados {{ numero_res }} documentos.</h3>
|
|
{% endif %}
|
|
<form method="POST" enctype="multipart/form-data">
|
|
{% csrf_token %}
|
|
<fieldset>
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<label>Tipo*</label>
|
|
<div class="d-flex flex-row ">
|
|
<label for="tip_recebido" class="d-flex flex-row align-items-center px-2">
|
|
<input type="radio" id="tip_recebido" name="tipo" value="1" class="form-control" required="True">
|
|
Recebidas
|
|
</label>
|
|
<label for="tip_enviado" class="d-flex flex-row align-items-center px-2">
|
|
<input type="radio" id="tip_enviado" name="tipo" value="2" class="form-control" required="True">
|
|
Enviadas
|
|
</label>
|
|
<label for="tip_interno" class="d-flex flex-row align-items-center px-2">
|
|
<input type="radio" id="tip_interno" name="tipo" value="3" class="form-control" required="True">
|
|
Internas
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<br />
|
|
<fieldset>
|
|
<legend>Documentos para Vincular em Lote</legend>
|
|
<table class="table table-striped table-hover">
|
|
<div class="controls">
|
|
<div class="checkbox">
|
|
<label for="id_check_all"><input type="checkbox" id="id_check_all" onchange="checkAll(this)" /> Marcar/Desmarcar Todos</label>
|
|
<br><br>
|
|
<small>OBS: Documentos já inseridos na sessão atual não aparecem na lista abaixo.</small>
|
|
</div>
|
|
</div>
|
|
<thead><tr><th>Documento</th></tr></thead>
|
|
<tbody>
|
|
{% for documento in object_list %}
|
|
<tr>
|
|
<td class="p-0">
|
|
<label for="doc_{{documento.id}}" class="d-flex w-100 p-3">
|
|
<input type="checkbox" id="doc_{{documento.id}}" name="documento_id" value="{{documento.id}}" {% if check %} checked {% endif %}/>
|
|
<span>
|
|
{{documento.epigrafe}} - {{documento.assunto}}
|
|
{% if documento.restrito %}<br><small class="text-danger" >(Documento Restrito)</small> {% endif %}
|
|
</span>
|
|
|
|
</label>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</fieldset>
|
|
<input type="submit" value="Salvar" class="btn btn-primary"S>
|
|
</form>
|
|
{% else %}
|
|
<tr><td><h3 style="text-align: right;">Nenhuma documento encontrado.</h3></td></tr>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endblock detail_content %}
|
|
|
|
{% block extra_js %}
|
|
<script language="JavaScript">
|
|
function checkAll(elem) {
|
|
let checkboxes = document.getElementsByName('documento_id');
|
|
for (let i = 0; i < checkboxes.length; i++) {
|
|
if (checkboxes[i].type == 'checkbox')
|
|
checkboxes[i].checked = elem.checked;
|
|
}
|
|
}
|
|
</script>
|
|
{% endblock %}
|
|
|