EditionPN/app/templates/form.html

59 lines
2.3 KiB
HTML
Raw Normal View History

2021-05-06 10:26:28 +02:00
{% extends "base.html" %}
{% block content %}
<form action="" enctype=multipart/form-data method="post" novalidate>
{{ form.hidden_tag() }}
<div class="content">
<h1 class="title">{% block form_title %}{% endblock %}</h1>
{% block formulaire %}{% endblock %}
2021-05-10 12:11:01 +02:00
<div class="field is-grouped">
<div class="control">
{{ form.sauvegarder(class="button")}}
</div>
<div class="control">
{{ form.charger(class="button")}}
</div>
<div class="control">
{{ form.exporter(class="button")}}
</div>
<div class="control">
<div class="file has-name">
<label class="file-label">
{{ form.fichier(class="file-input") }}
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-file-import"></i>
</span>
<span class="file-label">
{{ form.fichier.label }}
2021-05-06 10:26:28 +02:00
</span>
2021-05-10 12:11:01 +02:00
</span>
{{ form.importer(class="button file-name") }}
</label>
2021-05-06 10:26:28 +02:00
</div>
2021-05-10 12:11:01 +02:00
{% for error in form.fichier.errors %}
<p class="help is-danger">{{error}}</p>
2021-05-06 19:26:09 +02:00
{% endfor %}
2021-05-10 12:11:01 +02:00
</div>
</div>
2021-06-01 19:31:24 +02:00
{% for error in form.referentiel.errors %}
2021-05-10 12:11:01 +02:00
<p class="help is-danger">{{error}}</p>
{% endfor %}
{% if form.referentiel.choices|length != 0 %}
<ul>
{% for referentiel in form.referentiel %}
<li>{{ referentiel }} {{ referentiel.data.code }} - {% if referentiel.data.nom == None or referentiel.data.titre == None %}/!\ Référentiel à compléter /!\{% else %}{{ referentiel.data.nom }}{{ referentiel.data.titre }}{% endif %}</li>
{% endfor %}
</ul>
<div class="control">
{{ form.supprimer(class="button is-danger") }}
{% for error in form.supprimer.errors %}
<p class="help is-danger">{{error}}</p>
{% endfor %}
</div>
{% endif %}
2021-05-06 10:26:28 +02:00
</div>
</form>
{% endblock %}