Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow tab to "Show Password" within Login Page #11812

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions dojo/static/dojo/css/dojo.css
Original file line number Diff line number Diff line change
Expand Up @@ -1832,6 +1832,14 @@ small {
min-width:200px;
}

#toggleBox {
background-color: transparent!important;
border: none!important;
font-weight: bold!important;
position: absolute!important;
left: 0!important;
}

.EasyMDEContainer .table {
width: unset!important;
}
Expand Down
4 changes: 2 additions & 2 deletions dojo/static/dojo/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,11 @@ function togglePassVisibility() {
if (passwdInput.type === "password") {
passwdInput.type = "text";
toggleBox.innerHTML = "<i class='fa-solid fa-eye-slash'></i>\
<span><b>Hide Password</b></span>";
<span>Hide Password</span>";
} else {
passwdInput.type = "password";
toggleBox.innerHTML = "<i class='fa-solid fa-eye'></i>\
<span><b>Show Password</b></span>";
<span>Show Password</span>";
}
}

Expand Down
8 changes: 5 additions & 3 deletions dojo/templates/dojo/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ <h3>{% trans "Login" %}</h3>
<div class="form-group">

{% if SHOW_LOGIN_FORM or 'force_login_form' in request.GET %}
<div class="col-sm-offset-1 col-sm-2" id="toggleBox" onclick="togglePassVisibility()">
<i class="fa-solid fa-eye"></i>
<span><b>{% trans "Show Password" %}</b></span>
<div class="col-sm-offset-1 col-sm-2">
<button class="btn" id="toggleBox" onclick="togglePassVisibility()" type="button">
<i class="fa-solid fa-eye"></i>
{% trans "Show Password" %}
</button>
</div>
{% endif %}

Expand Down