From 3ee4018450c77d95205554fbe0e4299f58447524 Mon Sep 17 00:00:00 2001 From: Jirapong Pansak <55589246+MaoMaoCake@users.noreply.github.com> Date: Fri, 21 Feb 2025 16:28:24 +0700 Subject: [PATCH 1/2] Add Initial password field edits --- allauth_ui/templates/components/form.html | 9 ++++-- .../templates/components/form_field.html | 31 ++++++++++++++++++- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/allauth_ui/templates/components/form.html b/allauth_ui/templates/components/form.html index 3997aab..8b1fb4b 100644 --- a/allauth_ui/templates/components/form.html +++ b/allauth_ui/templates/components/form.html @@ -10,8 +10,13 @@ {% if render_fields == "true" %} {% for field in form.visible_fields %} {% if field.name != "remember" %} - {% #form_field field=field %} - {% /form_field %} + {% if field.name == "password" %} + {% #form_field field=field is_password='true' %} + {% /form_field %} + {% else %} + {% #form_field field=field %} + {% /form_field %} + {% endif %} {% endif %} {% endfor %} {% endif %} diff --git a/allauth_ui/templates/components/form_field.html b/allauth_ui/templates/components/form_field.html index bedd6a7..aff76bc 100644 --- a/allauth_ui/templates/components/form_field.html +++ b/allauth_ui/templates/components/form_field.html @@ -1,11 +1,40 @@ +{% load slippers %} {% load widget_tweaks %} +{% var is_password=is_password|default:"false" %} + + + + {% if field.errors %} {% render_field field placeholder="" class="w-full input input-bordered text-primary input-error" %} {% else %} - {% render_field field placeholder="" class="w-full input input-bordered text-primary" %} + {% if is_password == 'true' %} +