app-MAIL-temp/templates/_formhelpers.html
Carlos Quintana cb7868bdca
Add djlint (#1122)
* Add DJlint configuration

* Initial reformat for djlint

* Add template linting to CI

* Add explanation for HTML template checks in CONTRIBUTING.md
2022-06-29 11:28:26 +02:00

24 lines
682 B
HTML

{% macro render_field(field) %}
<div class="form-group row">
<label class="col-sm-2 col-form-label">{{ field.label }}</label>
<div class="col-sm-10">
{{ field(**kwargs)|safe }}
<small class="form-text text-muted">{{ field.description }}</small>
{% if field.errors %}
<ul class="errors">
{% for error in field.errors %}<li>{{ error }}</li>{% endfor %}
</ul>
{% endif %}
</div>
</div>
{% endmacro %}
{% macro render_field_errors(field) %}
{% if field.errors %}
<ul class="errors">
{% for error in field.errors %}<li class="text-danger">{{ error }}</li>{% endfor %}
</ul>
{% endif %}
{% endmacro %}