2015-01-22 09:56:23 -06:00
|
|
|
{% macro render_field_with_errors(field, type) %}
|
2018-10-10 06:43:26 -05:00
|
|
|
<div class="form-group mb-3 {% if field.errors %} has-error{% endif %}">
|
2016-06-21 08:21:06 -05:00
|
|
|
<input class="form-control" placeholder="{{ field.label.text }}" name="{{ field.name }}"
|
2017-11-28 04:55:54 -06:00
|
|
|
type="{% if type %}{{ type }}{% else %}{{ field.type }}{% endif %}" autofocus>
|
2018-10-10 06:43:26 -05:00
|
|
|
{% if field.errors %}
|
|
|
|
{% for error in field.errors %}
|
2019-01-02 03:35:15 -06:00
|
|
|
<span class="form-text">{{ error }}</span>
|
2018-10-10 06:43:26 -05:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2015-01-22 09:56:23 -06:00
|
|
|
</div>
|
|
|
|
{% endmacro %}
|
2020-04-06 05:27:05 -05:00
|
|
|
{% macro render_username_with_errors(field, type) %}
|
|
|
|
<div class="form-group mb-3 {% if field.errors %} has-error{% endif %}">
|
|
|
|
<input class="form-control" placeholder="{{ field.label.text }} / Username" name="{{ field.name }}"
|
|
|
|
type="{% if type %}{{ type }}{% else %}{{ field.type }}{% endif %}" autofocus>
|
|
|
|
{% if field.errors %}
|
|
|
|
{% for error in field.errors %}
|
|
|
|
<span class="form-text">{{ error }}</span>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endmacro %}
|