forked from ScoDoc/ScoDoc
113 lines
3.4 KiB
Django/Jinja
113 lines
3.4 KiB
Django/Jinja
{# -*- mode: jinja-html -*- #}
|
|
{% extends 'base.j2' %}
|
|
{% import 'bootstrap/wtf.html' as wtf %}
|
|
|
|
{% macro render_field(field, with_label=True) %}
|
|
<div>
|
|
{% if with_label %}
|
|
<span class="wtf-field">{{ field.label }} :</span>
|
|
{% endif %}
|
|
<span class="wtf-field">{{ field(**kwargs)|safe }}
|
|
{% if field.errors %}
|
|
<ul class=errors>
|
|
{% for error in field.errors %}
|
|
<li>{{ error }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</span>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% block app_content %}
|
|
|
|
<h1>Configuration générale</h1>
|
|
<div class="sco_help greenboldtext">Les paramètres donnés ici s'appliquent à tout ScoDoc (tous les départements).</div>
|
|
|
|
<section>
|
|
<h2>Calcul des "bonus" définis par l'établissement</h2>
|
|
<form id="configuration_form" class="sco-form" action="" method="post" enctype="multipart/form-data" novalidate>
|
|
{{ form_bonus.hidden_tag() }}
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
{{ wtf.quick_form(form_bonus) }}
|
|
</div>
|
|
</div>
|
|
<div id="bonus_description"></div>
|
|
</form>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Gestion des images: logos, signatures, ...</h2>
|
|
<div class="sco_help">Ces images peuvent être intégrées dans les documents
|
|
générés par ScoDoc: bulletins, PV, etc.
|
|
</div>
|
|
<p><a class="stdlink" href="{{url_for('scodoc.configure_logos')}}">configuration des images et logos</a>
|
|
</p>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Exports Apogée</h2>
|
|
<p><a class="stdlink" href="{{url_for('scodoc.config_codes_decisions')}}">configuration des codes de décision</a>
|
|
</p>
|
|
</section>
|
|
<section>
|
|
<h2>Assiduités</h2>
|
|
<p><a class="stdlink" href="{{url_for('scodoc.config_assiduites')}}">configuration du module d'assiduités</a>
|
|
</p>
|
|
</section>
|
|
|
|
<h2>Utilisateurs et CAS</h2>
|
|
<section>
|
|
<div>
|
|
🏰 <a class="stdlink" href="{{url_for('scodoc.config_cas')}}">Configuration du service CAS</a>
|
|
</div>
|
|
<div style="margin-top: 16px;">
|
|
🧑🏾🤝🧑🏼 <a class="stdlink" href="{{ url_for('auth.cas_users_import_config') }}">
|
|
Configurer les comptes utilisateurs pour le CAS</a>
|
|
</div>
|
|
<div style="margin-top: 16px;">
|
|
🛟 <a class="stdlink" href="{{url_for('auth.reset_standard_roles_permissions')}}">Remettre
|
|
les permissions des rôles standards à leurs valeurs par défaut</a>
|
|
(efface les modifications apportées aux rôles)
|
|
</div>
|
|
</section>
|
|
|
|
<h2>ScoDoc</h2>
|
|
<form id="configuration_form_scodoc" class="sco-form" action="" method="post" enctype="multipart/form-data" novalidate>
|
|
{{ form_scodoc.hidden_tag() }}
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
{{ wtf.quick_form(form_scodoc) }}
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
{{ super() }}
|
|
|
|
<script>
|
|
|
|
function update_bonus_description() {
|
|
let bonus_name = $("#configuration_form select")[0].value;
|
|
if (bonus_name) {
|
|
let query = "/ScoDoc/get_bonus_description/" + bonus_name;
|
|
$.get(query, '', function (data) {
|
|
$("#bonus_description").html(data);
|
|
});
|
|
} else {
|
|
$("#bonus_description").html("pas de bonus défini");
|
|
}
|
|
}
|
|
|
|
$(function () {
|
|
$("#configuration_form select").change(function () {
|
|
update_bonus_description();
|
|
});
|
|
|
|
update_bonus_description();
|
|
});
|
|
</script>
|
|
{% endblock %} |