kadenios/shared/templates/forms/file.html

35 lines
897 B
HTML

{% load i18n bulma %}
<label class="label {% if field.field.required %}{{ form.required_css_class }}{% endif %}">
{{ field.label_tag }}
</label>
<div class="control">
<div class="file has-name is-fullwidth">
<label class="file-label">
{{ field|bulmafy:'file-input' }}
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
{% trans "Choisissez un fichier..." %}
</span>
</span>
<span class="file-name is-expanded has-text-centered">
{% trans "Aucun fichier sélectionné" %}
</span>
</label>
</div>
{% for error in field.errors %}
<span class="help is-danger {{ form.error_css_class }}">{{ error }}</span>
{% endfor %}
{% if field.help_text %}
<p class="help">
{{ field.help_text|safe }}
</p>
{% endif %}
</div>