From f1ff86b3bf1b17e2010eb70d10ae41ba05527bd3 Mon Sep 17 00:00:00 2001 From: joelberto Date: Wed, 26 Jun 2024 19:33:02 -0300 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=92=A1scripts:=20add=20reveal=20passw?= =?UTF-8?q?ord=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/static/scripts/reveal_password.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/ui/static/scripts/reveal_password.js diff --git a/src/ui/static/scripts/reveal_password.js b/src/ui/static/scripts/reveal_password.js new file mode 100644 index 0000000..a82206e --- /dev/null +++ b/src/ui/static/scripts/reveal_password.js @@ -0,0 +1,17 @@ +window.RevealPassword = function(passwordID,iconID){ + + let eyeicon = document.getElementById(iconID); + let password = document.getElementById(passwordID); + + eyeicon.onclick = function () { + if (password.type === "password") { + password.type = "text"; + eyeicon.classList.remove("ph-eye-closed"); // Remove the 'ph-eye' class + eyeicon.classList.add("ph-eye"); // Add the 'ph-eye-closed' class + } else { + password.type = "password"; + eyeicon.classList.remove("ph-eye"); // Remove the 'ph-eye-closed' class + eyeicon.classList.add("ph-eye-closed"); // Add the 'ph-eye' class + } + }; +} From 41b063102aa67fcc9fedfa6cbfac0c5358d03a30 Mon Sep 17 00:00:00 2001 From: joelberto Date: Wed, 26 Jun 2024 19:35:32 -0300 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A7=B1template:=20add=20reveal=20pass?= =?UTF-8?q?word=20to=20login=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/templates/pages/login/index.html | 3 +- src/ui/templates/pages/login/login_form.html | 33 ++++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/ui/templates/pages/login/index.html b/src/ui/templates/pages/login/index.html index cace726..16fc3a4 100644 --- a/src/ui/templates/pages/login/index.html +++ b/src/ui/templates/pages/login/index.html @@ -1,7 +1,6 @@ {% extends "layouts/root.html" %} {% from "components/logo.html" import logo %} - {% block body %}
{% include "pages/login/login_form.html" %} -
+ diff --git a/src/ui/templates/pages/login/login_form.html b/src/ui/templates/pages/login/login_form.html index 7c43361..1bc3496 100644 --- a/src/ui/templates/pages/login/login_form.html +++ b/src/ui/templates/pages/login/login_form.html @@ -13,7 +13,8 @@ {% endif %} {% set input_container_class = -"flex items-center justify-center w-full gap-1 p-3 mt-1 border rounded-lg focus-within:ring-2 focus-within:ring-green-500" +"flex items-center justify-center w-full gap-1 p-3 mt-1 border rounded-lg focus-within:ring-2 +focus-within:ring-green-500" %} {% set input_class = @@ -32,8 +33,7 @@ class="block text-gray-700", ) }} -
+
{{ login_form.email( @@ -51,10 +51,11 @@ class="block text-gray-700", ) }} -
+
- {{ login_form.password(class=input_class, placeholder="****") }} + {{ login_form.password(class=input_class, placeholder="****",id ="password") }} + +
{{ error_messages(login_form.password.errors[0]) }}
@@ -65,15 +66,13 @@
-
+ + From 72c069fb69197c0c1c9aa6d3aa5f58711bb69009 Mon Sep 17 00:00:00 2001 From: joelberto Date: Wed, 26 Jun 2024 19:35:54 -0300 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A7=B1template:=20add=20reveal=20pass?= =?UTF-8?q?word=20to=20reset=20password=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/reset_password/fields.html | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/ui/templates/pages/reset_password/fields.html b/src/ui/templates/pages/reset_password/fields.html index 06db79b..7c7564e 100644 --- a/src/ui/templates/pages/reset_password/fields.html +++ b/src/ui/templates/pages/reset_password/fields.html @@ -20,20 +20,40 @@ {{ form.password(class=input_class, placeholder="****") }} + + {{ error_messages(form.password.errors[0]) }}
- {{ form.confirm_password.label(class=label_class, placeholder="****") }} + {{ form.confirm_password.label(class=label_class, placeholder="****",id = "password") }}
- {{ form.confirm_password(class=input_class, placeholder="****") }} + {{ form.confirm_password(class=input_class, placeholder="****",id = "confirmPassword") }} +
{{ error_messages(form.confirm_password.errors[0]) }}
+ + +