2021-09-05 12:30:11 +02:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
{% import 'bootstrap/wtf.html' as wtf %}
|
|
|
|
|
|
|
|
{% macro render_field(field) %}
|
2021-09-08 23:00:01 +02:00
|
|
|
<div>
|
|
|
|
<span class="wtf-field">{{ field.label }} :</span>
|
|
|
|
<span class="wtf-field">{{ field()|safe }}
|
2021-09-05 12:30:11 +02:00
|
|
|
{% if field.errors %}
|
2021-09-08 23:00:01 +02:00
|
|
|
<ul class=errors>
|
2021-09-05 12:30:11 +02:00
|
|
|
{% for error in field.errors %}
|
2021-09-08 23:00:01 +02:00
|
|
|
<li>{{ error }}</li>
|
2021-09-05 12:30:11 +02:00
|
|
|
{% endfor %}
|
2021-09-08 23:00:01 +02:00
|
|
|
</ul>
|
2021-09-05 12:30:11 +02:00
|
|
|
{% endif %}
|
2021-09-08 23:00:01 +02:00
|
|
|
</span>
|
|
|
|
</div>
|
2021-09-05 12:30:11 +02:00
|
|
|
{% endmacro %}
|
|
|
|
|
2021-11-16 18:48:56 +01:00
|
|
|
{% macro render_logo(logo_form, titre=None) %}
|
|
|
|
{% if titre %}
|
|
|
|
<tr>
|
|
|
|
<td colspan="2">
|
|
|
|
<h3>{{ titre }}</h3>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
<tr>
|
|
|
|
<td style="padding-right: 20px">
|
|
|
|
<p class="help">{{ logo_form.form.description }} Image actuelle:</p>
|
|
|
|
<div class="img-container"><img src="{{ logo_form.logo.get_url_small() }}"
|
|
|
|
alt="pas de logo chargé" /></div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
Nom: {{ logo_form.form.logo.logoname }}<br/>
|
|
|
|
{{ logo_form.form.description }}<br/>
|
|
|
|
Format: {{ logo_form.logo.suffix }}<br/>
|
|
|
|
Taille en px: {{ logo_form.logo.size }}<br/>
|
|
|
|
{% if logo_form.logo.mm %}
|
|
|
|
Taile en mm: {{ logo_form.logo.mm }}<br/>
|
|
|
|
{% endif %}
|
|
|
|
Aspect ratio: {{ logo_form.logo.aspect_ratio }}<br/>
|
|
|
|
Usage: {{ logo_form.logo.get_usage() }}
|
|
|
|
<span class="wtf-field">{{ logo_form.action()|safe }}</span>
|
|
|
|
<span class="wtf-field">{{ render_field(logo_form.upload) }}</span>
|
|
|
|
{% if logo_form.can_delete %}
|
|
|
|
{{ render_field(logo_form.do_delete) }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
2021-09-05 12:30:11 +02:00
|
|
|
{% block app_content %}
|
|
|
|
|
2021-09-08 23:00:01 +02:00
|
|
|
{% if scodoc_dept %}
|
|
|
|
<h1>Logos du département {{ scodoc_dept }}</h1>
|
|
|
|
{% else %}
|
2021-11-16 18:48:56 +01:00
|
|
|
<h1>Configuration générale</h1>
|
2021-09-08 23:00:01 +02:00
|
|
|
{% endif %}
|
2021-09-05 12:30:11 +02:00
|
|
|
|
2021-09-08 23:00:01 +02:00
|
|
|
<form class="sco-form" action="" method="post" enctype="multipart/form-data" novalidate>
|
2021-09-05 12:30:11 +02:00
|
|
|
{{ form.hidden_tag() }}
|
2021-09-08 23:00:01 +02:00
|
|
|
{% if not scodoc_dept %}
|
|
|
|
<div class="sco_help">Les paramètres donnés ici s'appliquent à tout ScoDoc (tous les départements):</div>
|
2021-11-16 18:48:56 +01:00
|
|
|
{{ render_field(form.bonus_sport_func_name)}}
|
|
|
|
<div class="configuration_logo">
|
|
|
|
<table>
|
|
|
|
{{ form.footer.form.breakpoint(form) }}
|
|
|
|
{{ render_logo(form.header, 'Logo en-tête') }}
|
|
|
|
{{ render_logo(form.footer, 'Logo pied de page') }}
|
|
|
|
</table>
|
|
|
|
</div>
|
2021-09-08 23:00:01 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<!-- <div class="sco_help">Les paramètres ci-dessous peuvent être changés dans chaque département
|
|
|
|
(paramétrage).<br />On indique ici les valeurs initiales par défaut:
|
|
|
|
</div> -->
|
2021-11-16 18:48:56 +01:00
|
|
|
|
2021-09-05 12:30:11 +02:00
|
|
|
<div class="sco-submit">{{ form.submit() }}</div>
|
|
|
|
</form>
|
2021-09-08 23:00:01 +02:00
|
|
|
{% endblock %}
|