mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 15:26:46 -06:00
23 lines
954 B
HTML
23 lines
954 B
HTML
{% macro render_field_with_errors(field, type) %}
|
|
<div class="form-group mb-3 {% if field.errors %} has-error{% endif %}">
|
|
<input class="form-control" placeholder="{{ field.label.text }}" 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 %}
|
|
{% 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 %}
|