mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
37be0f4fa1
Uses uni-form to style forms and add a macro to ease this. Of course, the overall thing has to be reworked, but having this in place will help us to have something easier to change when we will really care about design. All the form templates can now be defined in templates/forms.html and be called thansk to {{ forms.name_of_the_form(form) }}. I've done some styling, but that's really not my thing, feel free to modify it.
13 lines
374 B
HTML
13 lines
374 B
HTML
{% macro input(field, multiple=False) -%}
|
|
<div class="ctrlHolder">
|
|
{{ field.label }}
|
|
{% if multiple == True %}
|
|
{{ field(multiple=True) }}
|
|
{% else %}
|
|
{{ field }}
|
|
{% endif %}
|
|
{% if field.description %}
|
|
<p class="formHint">{{ field.description }}</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro %}
|