From ec4f515012cf4a62dd34e2fca8fd1f1d19c6b385 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Fri, 17 Jan 2025 12:04:36 +0000 Subject: [PATCH] * Fri Jan 17 2025 Brian Read 11.0.0-42.sme - Implement password visibility icon - [SME: 12803] --- .../default/public/css/sme-password.css | 17 ++++++++++ .../default/public/images/visible-slash.png | Bin 0 -> 3558 bytes .../themes/default/public/images/visible.png | Bin 0 -> 3252 bytes .../themes/default/public/js/sme-password.js | 31 ++++++++++++++++++ .../default/templates/layouts/default.html.ep | 4 ++- .../themes/default/templates/login.html.ep | 6 ++-- .../templates/partials/_iba_pwd.html.ep | 6 ++-- .../templates/partials/_js_imports.html.ep | 6 ++-- .../templates/partials/_usr_pwd.html.ep | 6 ++-- .../templates/partials/_usr_pwds.html.ep | 8 ++--- .../default/templates/userpassword.html.ep | 8 ++--- smeserver-manager.spec | 5 ++- 12 files changed, 75 insertions(+), 22 deletions(-) create mode 100644 root/usr/share/smanager/themes/default/public/css/sme-password.css create mode 100644 root/usr/share/smanager/themes/default/public/images/visible-slash.png create mode 100644 root/usr/share/smanager/themes/default/public/images/visible.png create mode 100644 root/usr/share/smanager/themes/default/public/js/sme-password.js diff --git a/root/usr/share/smanager/themes/default/public/css/sme-password.css b/root/usr/share/smanager/themes/default/public/css/sme-password.css new file mode 100644 index 0000000..62e1bf3 --- /dev/null +++ b/root/usr/share/smanager/themes/default/public/css/sme-password.css @@ -0,0 +1,17 @@ +/* css/sme-password.css */ +.input-container { + position: relative; + display: inline-block; +} +.sme-password { + padding-right: 5px; /* Ensure space for the toggle icon */ +} +.toggle-password { + position: absolute; + right: 4px; /* Position it towards the right */ + top: 50%; /* Center vertically */ + transform: translateY(-50%); /* Adjust for exact centering */ + cursor: pointer; + width: 20px; /* Set the width of the icon */ + height: 20px; /* Set the height of the icon */ +} \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/public/images/visible-slash.png b/root/usr/share/smanager/themes/default/public/images/visible-slash.png new file mode 100644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4&2lgE_+rktKo z2>|joDqL~pL43KeQReJtB@C-5<6aypGd_9X>QgZQ4%FKC9wtM zSmeo;+T8}B>HzfGEFYq}_+09-PpT{a#7b}i>pI}ZSt3~85*2Y_A6xzx@Bz$HW4W#a*0*K#hk g^8j$kkapSp7jnpHtYR?3l>h($07*qoM6N<$f-lFIp#T5? literal 0 HcmV?d00001 diff --git a/root/usr/share/smanager/themes/default/public/images/visible.png b/root/usr/share/smanager/themes/default/public/images/visible.png new file mode 100644 index 0000000000000000000000000000000000000000..b53ec92491938a1a9ece1f970c1cfebffec7b5a5 GIT binary patch literal 3252 zcmai%_aoGg1IFKHo|V1n>~$h!L~&$hkK<6bBZO@6(UB3^oXB1&p_9?a-km*?J7lj; z=*ZsRzW>1Y`@{1*KRmBrpC6uh6C)iuYA$L30O<5|HO>B}!+!;)`0Fd#!Abx?8>XkJ zZV_U)^XMO6iz(KQ4Lq}Vd_n<7D@c324! z_+44KfqGgbH|DZmO4H4$8qu2|me7Z@Ig7cC7N|Fiu7s)6M!PI-5|J5iMOui?$L*~b zdkeIXftKSu|1n}g*y#P^Ic(1UbS20e8XR}mAHak%DFI5rbQLIfMulw&aHym3LJ|=u zQq%|+Ca29AbOTWE>_i?VlmBn%RQ|SGSCkw@15%W6Vk&XpG;f;0DO~KQ7g&(1d-p{i zG7mqIJI#L)7|o#)b*!_uZ+dYAUVy-^cUZlTj3n7SYpwC2GsjSx_cvnQd{-umJH<`b z(6X!)zE^|sc9bU4iXu+AF5jeLvUY%wsAZxI+UlA17l(INnX(+K|4`vN?aeq{W%pw3 zIf`pk&N3&)%y-EC&4OtU6vqk`QRtfsNJ;W;f(IA&GcEYXUf z&@efhGAnyy?81GaUnMh_cj%T*qK&`du%!P%-8U06>Ix>{F`ON@(rHygF(Ivs&D`ls=aGSJjdzFHk5QPStcG$8h9n3HE{*K9}DTAkHGTiwro+NKAI9kwMpIqXCgwM~K zUh@Y{l@1@sUpQcqVvvnV}SDWBE+DUEljG{ z#Rqok#yW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k1@$=eF4PM8scLr9^@kc0;g zG2a4>TK0(kx4dl@d0umlZrCtBTmP}gwnN$++#9Jy-7Ej#Ze3lU`+Aghv-a%j__Y+z z8T(u|XYoWG9Z8}nqXWl+K1UEtUm{TAOp&os*rq)X8zHFzLl27Aue|6UT}1k8PmP z1b?j(>9ES}*}$y=Rc~$ONdUaEB2e(l$w$yJIGGb^^Hi&n<7KwnVFhUwBB+-aR1j#0 zQ})SPA#G;fY$Z9!GGHM42bfqhvt?&D_xwbT5eqcskmtkU4PIvFn`GZP|9mg3H0>1> zvQr{i^x7oQx62jLp*Zv?*{^<+RYM%e#;P*1b`yWR;c9W73U zk`9mZEM>)JuVjF-9ibGMM)o9@<|E8F)xV!4r8aN%h{X*}g=2+kuhZ@DMHZRdQMHM- z&)Wl%%1Yuxk*y=!zA-aEIc7u2IyWxm(LJPfU#`o}tH-xkGZb;|2t^>7Xer4OzxIc@WW zg=aF~FWT}Xt%S{xbY4d?f=8Ciz5}V7ee^vp#wBCDZqV8v$ra3pxrRqsvvWZ}v-V`I zX2YH>sF!x-f&v_rGn^&>mwaf{h`NexNBl?{T<`%1;+XdqmV>kH#bPG`GJE?=y>USi z?IB>Jo>(V}!uh~JHluw$3IWx};T!?UPG7=VI(o+HA?#8MQ_T!c7N(XBTVDW#{L+;+ z9@L4{K`snS^8capYZ4#*z'); + + // Move the input into the new container + $(this).wrap($inputContainer); + + // Create the toggle image + var $togglePassword = $('Show Password'); + + // Append the toggle image to the container + $(this).after($togglePassword); + }); + + $('.toggle-password').on('click', function() { + // Find the associated password field + var input = $(this).siblings('.sme-password'); + + // Toggle the type attribute between password and text + var inputType = input.attr('type') === 'password' ? 'text' : 'password'; + input.attr('type', inputType); + + // Toggle the icon source based on the input type + var iconSrc = inputType === 'password' ? 'images/visible.png' : 'images/visible-slash.png'; + $(this).attr('src', iconSrc); + }); +}); \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep b/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep index 932e9e6..5bd7fed 100644 --- a/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep +++ b/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep @@ -11,6 +11,7 @@ %= stylesheet '/css/sme_main.css' %= stylesheet '/css/sme_menu.css' %= stylesheet '/css/styles.css' + %= stylesheet '/css/sme-password.css' %= content_for 'head_contrib' % if (config 'hasJquery') { %= include 'partials/_js_imports' @@ -32,6 +33,7 @@ %= javascript '/js/buttons.html5.min.js' %= javascript '/js/buttons.print.min.js' %= javascript '/js/flag-by-locale.js' + %= javascript '/js/sme-password.js' %= stylesheet '/css/sme-jquery-overrides.css' @@ -125,4 +127,4 @@ - + \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/login.html.ep b/root/usr/share/smanager/themes/default/templates/login.html.ep index 89cd346..d460b38 100644 --- a/root/usr/share/smanager/themes/default/templates/login.html.ep +++ b/root/usr/share/smanager/themes/default/templates/login.html.ep @@ -43,9 +43,9 @@

%=l 'PASSWORD' - %= password_field 'Password', id => 'id_password', autocomplete => 'current-password' + %= password_field 'Password', id => 'id_password', autocomplete => 'current-password', class=>'sme-password' % if (config 'hasJquery') { - Visible + %# Visible % }

%} @@ -66,4 +66,4 @@ % end -%end +%end \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/partials/_iba_pwd.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_iba_pwd.html.ep index 58f8613..83f55e1 100644 --- a/root/usr/share/smanager/themes/default/templates/partials/_iba_pwd.html.ep +++ b/root/usr/share/smanager/themes/default/templates/partials/_iba_pwd.html.ep @@ -17,7 +17,7 @@ %=l 'PASSWORD_NEW', class => 'label' - %= password_field 'newPass', class => 'input' + %= password_field 'newPass', class => 'input' , class=>'sme-password'

@@ -25,7 +25,7 @@ %=l 'PASSWORD_VERIFY_NEW', class => 'label' - %= password_field 'newPassVerify', class => 'input' + %= password_field 'newPassVerify', class => 'input', class=>'sme-password'

@@ -39,4 +39,4 @@ % end - + \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/partials/_js_imports.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_js_imports.html.ep index c145fcd..d5c2054 100644 --- a/root/usr/share/smanager/themes/default/templates/partials/_js_imports.html.ep +++ b/root/usr/share/smanager/themes/default/templates/partials/_js_imports.html.ep @@ -1,5 +1,5 @@ - + @@ -98,4 +98,4 @@ }); % end -% end +% end \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/partials/_usr_pwd.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_usr_pwd.html.ep index 7e4f1bf..35a1c7b 100644 --- a/root/usr/share/smanager/themes/default/templates/partials/_usr_pwd.html.ep +++ b/root/usr/share/smanager/themes/default/templates/partials/_usr_pwd.html.ep @@ -18,7 +18,7 @@ %=l 'PASSWORD_NEW', class => 'label' - %= password_field 'newPass', class => 'input' + %= password_field 'newPass', class => 'input', class=>'sme-password'

@@ -26,7 +26,7 @@ %=l 'PASSWORD_VERIFY_NEW', class => 'label' - %= password_field 'newPassVerify', class => 'input' + %= password_field 'newPassVerify', class => 'input', class=>'sme-password'

@@ -41,4 +41,4 @@ % end - + \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/partials/_usr_pwds.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_usr_pwds.html.ep index 6fdee33..007bc91 100644 --- a/root/usr/share/smanager/themes/default/templates/partials/_usr_pwds.html.ep +++ b/root/usr/share/smanager/themes/default/templates/partials/_usr_pwds.html.ep @@ -11,7 +11,7 @@ %=l 'usr_CURRENT_SYSTEM_PASSWORD', class => 'label' - %= password_field 'CurPass', class => 'input' + %= password_field 'CurPass', class => 'input', class=>'sme-password'

@@ -19,7 +19,7 @@ %=l 'usr_NEW_SYSTEM_PASSWORD', class => 'label' - %= password_field 'Pass', class => 'input' + %= password_field 'Pass', class => 'input', class=>'sme-password'

@@ -27,7 +27,7 @@ %=l 'usr_NEW_SYSTEM_PASSWORD_VERIFY', class => 'label' - %= password_field 'PassVerify', class => 'input' + %= password_field 'PassVerify', class => 'input', class=>'sme-password'

@@ -42,4 +42,4 @@ % end - + \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/userpassword.html.ep b/root/usr/share/smanager/themes/default/templates/userpassword.html.ep index 9020cdf..9e946e3 100644 --- a/root/usr/share/smanager/themes/default/templates/userpassword.html.ep +++ b/root/usr/share/smanager/themes/default/templates/userpassword.html.ep @@ -47,7 +47,7 @@

%= l 'pwd_PASSWORD_OLD' - %= password_field 'Oldpass', class => 'input' + %= password_field 'Oldpass', class => 'input', class=>'sme-password'

% } @@ -55,14 +55,14 @@

%=l 'pwd_PASSWORD_NEW' - %= password_field 'Pass', class => 'input' + %= password_field 'Pass', class => 'input', class=>'sme-password'

%=l 'pwd_PASSWORD_VERIFY_NEW' - %= password_field 'Passverify', class => 'input' + %= password_field 'Passverify', class => 'input', class=>'sme-password'

@@ -75,4 +75,4 @@ -% end +% end \ No newline at end of file diff --git a/smeserver-manager.spec b/smeserver-manager.spec index 5691a54..21f2261 100644 --- a/smeserver-manager.spec +++ b/smeserver-manager.spec @@ -2,7 +2,7 @@ Summary: Sme server navigation module : manager 2 %define name smeserver-manager Name: %{name} %define version 11.0.0 -%define release 41 +%define release 42 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -115,6 +115,9 @@ true %defattr(-,root,root) %changelog +* Fri Jan 17 2025 Brian Read 11.0.0-42.sme +- Implement password visibility icon - [SME: 12803] + * Wed Jan 15 2025 Brian Read 11.0.0-41.sme - Add journal files to those not viewable [SME: 12870]