TatoniMatteo commented on code in PR #1506:
URL: https://github.com/apache/syncope/pull/1506#discussion_r3861795931


##########
client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html:
##########
@@ -56,18 +56,30 @@
 
     <div class="container">
       <div class="login-card card card-container">
-        <img class="login-logo" src="ui-commons/img/logo-green.png" />
+        <img class="login-logo" src="ui-commons/img/logo-green.png"/>
 
         <span wicket:id="feedback" role="alert"/>
 
         <form class="form-signin" wicket:id="login">
           <fieldset class="form-group">
-            <input type="text" wicket:id="username" class="form-control" 
-                   wicket:message="placeholder:username" required="required" 
autofocus="autofocus" />
-
-            <input type="password" wicket:id="password" class="form-control" 
-                   wicket:message="placeholder:password" required="required" />
-
+            <input type="text" wicket:id="username" class="form-control"
+                   wicket:message="placeholder:username" required="required" 
autofocus="autofocus"/>
+            <div class="d-flex">
+              <input type="password" wicket:id="password" class="form-control 
input-password"
+                         wicket:message="placeholder:password" 
required="required"/>
+              <button type="button" class="btn btn-warning btn-flat 
input-group-text btn-eye" onclick="
+                var input = $(this).prev('input');
+                var type = input.attr('type');
+                var children = $(this).children();
+                if (type !== 'text') {
+                  $(input).attr('type', 'text');
+                  $(children).addClass('fa-eye-slash').removeClass('fa-eye');
+                } else {
+                  $(input).attr('type', 'password');
+                  $(children).removeClass('fa-eye-slash').addClass('fa-eye');
+                }
+                return false;"><i class="fa fa-eye"></i></button>
+              </div>

Review Comment:
   This can be done more simply and consistently with what already exists, like 
this:
   ```
   <div class="input-group d-flex">
                 <input type="password" class="form-control w-75" 
wicket:id="password"
                        wicket:message="placeholder:password" 
required="required"/>
                 <button type="button" class="btn btn-warning btn-flat 
input-group-text w-25 m-0 h-100" onclick="
                   var input = $(this).prevAll('input');
                   var type = input.attr('type');
                   var children = $(this).children();
                   if (type !== 'text') {
                     $(input).attr('type', 'text');
                     $(children).addClass('fa-eye-slash').removeClass('fa-eye');
                   } else {
                     $(input).attr('type', 'password');
                     $(children).removeClass('fa-eye-slash').addClass('fa-eye');
                   }
                   return false;">
                   <i class="fa fa-eye"></i>
                 </button>
               </div>
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to