Skip to content

Commit

Permalink
MID-6271 login javascript fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed May 2, 2022
1 parent 0f56953 commit 0276517
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
26 changes: 13 additions & 13 deletions gui/admin-gui/src/frontend/js/midpoint-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,6 @@ export default class MidPointTheme {
});
});

function showPassword(iconElement) {
var parent = iconElement.closest(".password-parent");
var input = parent.querySelector("input");

if (input.type === "password") {
input.type = "text";
iconElement.className = 'fa fa-eye-slash';
} else {
input.type = "password";
iconElement.className = 'fa fa-eye';
}
}

!function($) {
$.fn.passwordFieldValidatorPopover = function(inputId, popover) {
return this.each(function() {
Expand Down Expand Up @@ -475,4 +462,17 @@ export default class MidPointTheme {
}
}
}

showPassword(iconElement) {
var parent = iconElement.closest(".password-parent");
var input = parent.querySelector("input");

if (input.type === "password") {
input.type = "text";
iconElement.className = 'fa fa-eye-slash';
} else {
input.type = "password";
iconElement.className = 'fa fa-eye';
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<html xmlns:wicket="http://wicket.apache.org">
<body>
<wicket:extend>

<div class="row">
<div class="col-md-offset-2 col-md-8 col-lg-offset-4 col-lg-4">
<div class="card" style="margin-top: 120px;">
Expand All @@ -26,7 +25,6 @@
</div>
</div>


<script type="text/javascript">
$(".focus-username").focus();
</script>
Expand All @@ -43,6 +41,5 @@
}
</style>
</wicket:extend>

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
wicket:message="placeholder:PageLogin.password" style="padding-right: 26px;">
</div>
<div style="position: absolute; right: 8px; top: 8px; z-index: 5;">
<i class="fa fa-eye" style="float:right; cursor: pointer; color: #555555;" onclick="showPassword(this)"></i>
<i class="fa fa-eye" style="float:right; cursor: pointer; color: #555555;" onclick="MidPointTheme.showPassword(this)"></i>
</div>
</div>
</div>
Expand Down

0 comments on commit 0276517

Please sign in to comment.