From 9fa230ea206712b90f39c4ed57f2b6b48731f78b Mon Sep 17 00:00:00 2001 From: jordyBSK Date: Fri, 6 Sep 2024 09:14:19 +0200 Subject: [PATCH 1/7] feat: replace the input password and add fa-eye --- my_compassion/templates/signup.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/my_compassion/templates/signup.xml b/my_compassion/templates/signup.xml index 1d9a6a0..976a766 100644 --- a/my_compassion/templates/signup.xml +++ b/my_compassion/templates/signup.xml @@ -30,6 +30,12 @@ + +
+ + +
+
From 7d9a51ec2004704b33a8c70a3213a201d3d7ced2 Mon Sep 17 00:00:00 2001 From: jordyBSK Date: Fri, 6 Sep 2024 09:14:36 +0200 Subject: [PATCH 2/7] feat: replace the input confirm_password and add fa-eye --- my_compassion/templates/signup.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/my_compassion/templates/signup.xml b/my_compassion/templates/signup.xml index 976a766..fa8ca7d 100644 --- a/my_compassion/templates/signup.xml +++ b/my_compassion/templates/signup.xml @@ -36,6 +36,12 @@ + +
+ + +
+
From a5deb6269cdcbcd55aee662cb4d2d0ec687e34d4 Mon Sep 17 00:00:00 2001 From: jordyBSK Date: Fri, 6 Sep 2024 14:54:06 +0200 Subject: [PATCH 3/7] feat: create and add js file --- my_compassion/static/src/js/show_password.js | 30 ++++++++++++++++++++ my_compassion/templates/signup.xml | 4 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 my_compassion/static/src/js/show_password.js diff --git a/my_compassion/static/src/js/show_password.js b/my_compassion/static/src/js/show_password.js new file mode 100644 index 0000000..423f3b3 --- /dev/null +++ b/my_compassion/static/src/js/show_password.js @@ -0,0 +1,30 @@ +document.addEventListener("DOMContentLoaded", function (event) { + + odoo.define('my_compassion.show_password', function (require) { + 'use strict'; + + var publicWidget = require('web.public.widget'); + + publicWidget.registry.show_password = publicWidget.Widget.extend({ + selector: '#eye_password', + events: { + 'click': '_onClick', + }, + + _onClick: function (ev) { + console.log("Show password clicked"); + // ev.preventDefault(); + // var $icon = $(ev.currentTarget); + // var $input = $icon.siblings('input'); + // var type = $input.attr('type'); + // if (type === 'password') { + // $input.attr('type', 'text'); + // $icon.removeClass('fa-eye').addClass('fa-eye-slash'); + // } else { + // $input.attr('type', 'password'); + // $icon.removeClass('fa-eye-slash').addClass('fa-eye'); + // } + }, + }); + }); +}); diff --git a/my_compassion/templates/signup.xml b/my_compassion/templates/signup.xml index fa8ca7d..be2c29d 100644 --- a/my_compassion/templates/signup.xml +++ b/my_compassion/templates/signup.xml @@ -1,6 +1,5 @@ -