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