1
0
mirror of https://github.com/moepman/bk-dss synced 2024-11-01 01:27:05 +01:00
bk-dss/templates/_helpers.html

19 lines
653 B
HTML
Raw Normal View History

{% macro render_field(field) %}
<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 %}
</div>
{% endif %}
</div></div>
2016-03-21 23:16:50 +01:00
{%- endmacro %}
{% macro render_button(button) %}
<div class="form-group row"><div class="offset-sm-3 col-sm-5">{{ button(class_="btn btn-primary") }}</div></div>
{%- endmacro %}