pgadmin4/web/pgadmin/templates/security/fields.html
2020-04-06 15:57:05 +05:30

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 %}