59 lines
2.3 KiB
HTML
59 lines
2.3 KiB
HTML
{% 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 %}
|
|
|
|
<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 }}
|
|
</span>
|
|
</span>
|
|
{{ form.importer(class="button file-name") }}
|
|
</label>
|
|
</div>
|
|
{% for error in form.fichier.errors %}
|
|
<p class="help is-danger">{{error}}</p>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% for error in form.referentiel.errors %}
|
|
<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 %}
|
|
</div>
|
|
</form>
|
|
{% endblock %} |