ScoDoc-PE/app/templates/assiduites/pages/ajout_justificatif_etud.j2

112 lines
3.4 KiB
Django/Jinja

{% extends "sco_page.j2" %}
{% import 'wtf.j2' as wtf %}
{% block styles %}
{{super()}}
<link rel="stylesheet" href="{{scu.STATIC_DIR}}/libjs/timepicker-1.3.5/jquery.timepicker.min.css"/>
<link rel="stylesheet" href="{{scu.STATIC_DIR}}/css/assiduites.css">
{% endblock %}
{% block app_content %}
<style>
form#ajout-justificatif-etud {
margin-bottom: 24px;
}
form#ajout-justificatif-etud > div {
margin-bottom: 16px;
}
div.submit {
margin-top: 12px;
}
div.submit > input {
margin-right: 16px;
}
</style>
<div class="tab-content">
<h2>Justifier des absences ou retards</h2>
<section class="justi-form page">
{% for err_msg in form.error_messages %}
<div class="wtf-error-messages">
{{ err_msg }}
</div>
{% endfor %}
<form id="ajout-justificatif-etud" method="post" enctype="multipart/form-data">
<fieldset>
{{ form.hidden_tag() }}
{# Dates et heures #}
<div class="dates-heures">
{{ form.date_debut.label }}&nbsp;: {{ form.date_debut }}
de {{ form.heure_debut }} à {{ form.heure_fin }}
<span class="help">laisser les heures vides pour indiquer la journée entière</span>
{{ render_field_errors(form, 'date_debut') }}
{{ render_field_errors(form, 'heure_debut') }}
{{ render_field_errors(form, 'heure_fin') }}
<div>
{{ form.date_fin.label }}&nbsp;: {{ form.date_fin }}
<span class="help">si le jour de fin est différent,
les heures seront ignorées (journées complètes)</span>
{{ render_field_errors(form, 'date_fin') }}
</div>
</div>
{# Etat #}
<div>
<div>{{ form.etat.label }}</div>
{{ form.etat() }}
{{ render_field_errors(form, 'etat') }}
</div>
{# Raison #}
<div>
<div>{{ form.assi_raison.label }}</div>
{{ form.assi_raison() }}
{{ render_field_errors(form, 'assi_raison') }}
</div>
{# Fichier(s) justificatif(s) #}
<div>
<div>{{ form.fichiers.label }}</div>
{{ form.fichiers() }}
{{ render_field_errors(form, 'fichiers') }}
</div>
{# Date dépot #}
{{ form.entry_date.label }}&nbsp;: {{ form.entry_date }}
<span class="help">laisser vide pour date courante</span>
{{ render_field_errors(form, 'entry_date') }}
{# Submit #}
<div class="submit">
{{ form.submit }} {{ form.cancel }}
</div>
</fieldset>
</form>
</section>
<section class="assi-liste">
{{tableau | safe }}
</section>
</div>
{% endblock app_content %}
{% block scripts %}
{{ super() }}
<script src="{{scu.STATIC_DIR}}/libjs/timepicker-1.3.5/jquery.timepicker.min.js"></script>
<script src="{{scu.STATIC_DIR}}/js/assiduites.js"></script>
<script src="{{scu.STATIC_DIR}}/js/etud_info.js"></script>
<script>
$('.timepicker').timepicker({
timeFormat: 'HH:mm',
interval: {{ scu.get_assiduites_time_config("assi_tick_time") }},
minTime: "{{ scu.get_assiduites_time_config("assi_morning_time") }}",
maxTime: "{{ scu.get_assiduites_time_config("assi_afternoon_time") }}",
startTime: "{{ scu.get_assiduites_time_config("assi_morning_time") }}",
dynamic: false,
dropdown: true,
scrollbar: false
});
</script>
{% endblock scripts %}