1
0
mirror of https://github.com/moepman/bk-dss synced 2024-12-22 23:04:26 +01:00
bk-dss/templates/_helpers.html
Markus Hauschild 933443f30e upgrdae to bootstrap 4
adjust classes to look okay with bootstrap 4
replace glyphicons with inline svgs from bootstrap-icons
2020-09-10 10:50:47 +02:00

19 lines
653 B
HTML

{% 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">
{% for error in field.errors %}
{{ error }}
{% endfor %}
</div>
{% endif %}
</div></div>
{%- 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 %}