Skip to content

Commit

Permalink
fix: correct template syntax error in sign-up step 2 by combining wit…
Browse files Browse the repository at this point in the history
…h statements and removing invalid filter
  • Loading branch information
adrianmcphee committed Nov 25, 2024
1 parent d058708 commit a9e8ac5
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
{% load static %}
<div class="flex flex-col">
<div class="space-y-6 mb-0">
{% with password_field_errors = wizard.form.password.errors %}
{% with non_field_errors = wizard.form|call:non_field_errors %}
{% with password_field_errors=wizard.form.password.errors non_field_errors=wizard.form.non_field_errors %}
{% if password_field_errors or non_field_errors %}
<div
class="w-fit mx-auto flex items-center px-3 py-1.5 py-2.5 rounded-md border border-solid border-[#F5222D] text-sm text-black/[0.85] bg-[#f5222d]/[0.08]">
<span class="w-4 h-4 flex shrink-0 items-center justify-center mr-3">
<img src="{% static 'images/error.svg' %}" alt="Error Icon">
</span>
<ul>
{% for error in non_field_errors|list + password_field_errors|list %}
<li>{{ error }}</li>
{% endfor %}
{% for error in non_field_errors|default_if_none:'' %}
<li>{{ error }}</li>
{% endfor %}
{% for error in password_field_errors|default_if_none:'' %}
<li>{{ error }}</li>
{% endfor %}
</ul>
</div>
{% else %}
<div
class="w-fit mx-auto text-center flex items-center px-3 py-1.5 py-2.5 rounded-md border border-solid border-[#00B400] text-sm text-black/[0.85] bg-[#DBFFDB]">
Email verified! Please set your username and password.
</div>
{% endif %}
{% endif %}

<div>
<label for="{{ wizard.form.username.id_for_label }}"
Expand Down

0 comments on commit a9e8ac5

Please sign in to comment.