EditionPN/app/templates/form.html

48 lines
1.7 KiB
HTML
Raw Normal View History

2021-05-06 10:26:28 +02:00
{% macro render_field(field,class) %}
<div class="field">
<label class="label">{{ field.label }}</label>
<div class="control">
{{ field(class=class)}}
</div>
{% for error in field.errors %}
<p class="help is-danger">{{error}}</p>
{% endfor %}
</div>
{% endmacro %}
{% 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.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", accept=".yml")}}
</label>
</div>
{% for error in form.fichier.errors %}
<p class="help is-danger">{{error}}</p>
{% endfor %}
</div>
</div>
</div>
</form>
{% endblock %}