Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed duplication of identifiers in form fields layout (macro) #1049

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions flask_security/templates/security/_macros.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% macro render_field_with_errors(field) %}
<div class="fs-div" id="{{ field.id|default('fs-field') }}">
<div class="fs-div" id="fs-{{ field.id|default('field') }}">
{{ field.label }} {{ field(**kwargs)|safe }}
{% if field.errors %}
<ul>
Expand All @@ -10,11 +10,11 @@
{% endmacro %}

{% macro render_field(field) %}
<div class="fs-div" id="{{ field.id|default('fs-field') }}">{{ field(**kwargs)|safe }}</div>
<div class="fs-div" id="fs-{{ field.id|default('field') }}">{{ field(**kwargs)|safe }}</div>
{% endmacro %}

{% macro render_field_errors(field) %}
<div class="fs-div" id="{{ field.id if field else 'fs-field' }}">
<div class="fs-div" id="fs-{{ field.id|default('field') }}">
{% if field and field.errors %}
<ul>
{% for error in field.errors %}<li class="fs-error-msg">{{ error }}</li>{% endfor %}
Expand Down
Loading
Loading