2015-06-17 20:13:55 +02:00
|
|
|
{% macro render_field(field) %}
|
2020-09-10 10:50:47 +02:00
|
|
|
<div class="form-group row mb-3">
|
|
|
|
{{ field.label(class_="col-form-label col-sm-3 text-right") }}
|
|
|
|
{% if field.errors %}{% set class_extras = " is-invalid" %}{% else %}{% set class_extras = "" %}{% endif %}
|
|
|
|
<div class="col-sm-5">{{ field(class_="form-control" + class_extras) }}
|
|
|
|
{% if field.errors %}
|
|
|
|
<div class="invalid-feedback">
|
2016-03-22 13:23:10 +01:00
|
|
|
{% for error in field.errors %}
|
|
|
|
{{ error }}
|
|
|
|
{% endfor %}
|
2020-09-10 10:50:47 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div></div>
|
2016-03-21 23:16:50 +01:00
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{% macro render_button(button) %}
|
2020-09-10 10:50:47 +02:00
|
|
|
<div class="form-group row"><div class="offset-sm-3 col-sm-5">{{ button(class_="btn btn-primary") }}</div></div>
|
2015-06-17 20:13:55 +02:00
|
|
|
{%- endmacro %}
|