Commit f48eff4e authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Affiche les contraintes de taile/nombre après le bouton d'ajout.

Showing with 16 additions and 0 deletions
+16 -0
button.upload: Ajouter un fichier
form:
file_upload:
description.placeholder: Description facultative
max_number_of_files(%num%): %num% fichiers maximum
min_file_size: Taille minimale
max_file_size: Taille maximale
......@@ -58,5 +58,14 @@
{%- if disabled or read_only %} disabled="disabled"{% endif -%}
/>
</div>
{% if multiple and widget_attr["data-max-number-of-files"] is defined %}
&nbsp;<small>{% trans with {"%num%": widget_attr["data-max-number-of-files"]}%}form.file_upload.max_number_of_files(%num%){% endtrans %}.</small>
{% endif %}
{% if widget_attr["data-min-file-size"] is defined %}
&nbsp;<small>{% trans %}form.file_upload.min_file_size{% endtrans %}&nbsp;: <span class="size" data-size-precision="0">{{ widget_attr["data-min-file-size"] }}</span></small>
{% endif %}
{% if widget_attr["data-max-file-size"] is defined %}
&nbsp;<small>{% trans %}form.file_upload.max_file_size{% endtrans %}&nbsp;: <span class="size" data-size-precision="0">{{ widget_attr["data-max-file-size"] }}</span></small>
{% endif %}
</div>
{% endblock file_upload_widget %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment