Skip to content

Commit

Permalink
ref: rename pswd visivility func
Browse files Browse the repository at this point in the history
  • Loading branch information
RezenkovD committed Aug 7, 2023
1 parent fc9c07f commit 5b1c09a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion users/templates/account/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
<div class="password-input">
{{ form.password }}
<button class="transparent-button" type="button"
onclick="togglePasswordVisibilityOne('{{ form.password.id_for_label }}')">
onclick="toggleOnePasswordVisibility('{{ form.password.id_for_label }}')">
<svg id="eye-icon-one" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="#4FB4FE" stroke-linecap="round"
stroke-linejoin="round">
Expand Down
8 changes: 4 additions & 4 deletions users/templates/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
<div class="password-input">
{{ form.password1 }}
<button class="transparent-button" type="button"
onclick="togglePasswordVisibilityOne('{{ form.password1.id_for_label }}')">
onclick="toggleOnePasswordVisibility('{{ form.password1.id_for_label }}')">
<svg id="eye-icon-one" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="#4FB4FE" stroke-linecap="round"
stroke-linejoin="round">
Expand Down Expand Up @@ -327,7 +327,7 @@
<div class="password-input">
{{ form.password1 }}
<button class="transparent-button" type="button"
onclick="togglePasswordVisibilityOne('{{ form.password1.id_for_label }}')">
onclick="toggleOnePasswordVisibility('{{ form.password1.id_for_label }}')">
<svg id="eye-icon-one" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="#4FB4FE" stroke-linecap="round"
stroke-linejoin="round">
Expand All @@ -354,7 +354,7 @@
<div class="password-input">
{{ form.password2 }}
<button class="transparent-button" type="button"
onclick="togglePasswordVisibilityTwo('{{ form.password2.id_for_label }}')">
onclick="toggleTwoPasswordVisibility('{{ form.password2.id_for_label }}')">
<svg id="eye-icon-two" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="#4FB4FE" stroke-linecap="round"
stroke-linejoin="round">
Expand Down Expand Up @@ -387,7 +387,7 @@
<div class="password-input">
{{ form.password2 }}
<button class="transparent-button" type="button"
onclick="togglePasswordVisibilityTwo('{{ form.password2.id_for_label }}')">
onclick="toggleTwoPasswordVisibility('{{ form.password2.id_for_label }}')">
<svg id="eye-icon-two" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="#4FB4FE" stroke-linecap="round"
stroke-linejoin="round">
Expand Down
4 changes: 2 additions & 2 deletions users/templates/js/account.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function togglePasswordVisibilityOne(fieldId) {
function toggleOnePasswordVisibility(fieldId) {
var field = document.getElementById(fieldId);
var eyeIcon = document.getElementById('eye-icon-one');

Expand All @@ -11,7 +11,7 @@ function togglePasswordVisibilityOne(fieldId) {
eyeIcon.innerHTML = '<path d="M4.5 3.75L19.5 20.25" /> <path d="M14.522 14.775C13.8338 15.4054 12.9334 15.7535 12.0001 15.75C11.2432 15.7499 10.5041 15.5208 9.87984 15.0928C9.25561 14.6647 8.77551 14.0579 8.50265 13.3519C8.22979 12.6459 8.17695 11.8739 8.35107 11.1373C8.52519 10.4007 8.91812 9.73406 9.47821 9.22498" /> <path d="M6.9375 6.43127C3.1125 8.36252 1.5 12 1.5 12C1.5 12 4.5 18.75 12 18.75C13.7574 18.7643 15.4929 18.3594 17.0625 17.5688" /> <path d="M19.5562 15.8531C21.6 14.025 22.5 12 22.5 12C22.5 12 19.5 5.25002 12 5.25002C11.3498 5.24874 10.7006 5.30205 10.0593 5.4094" /> <path d="M12.7031 8.31567C13.5006 8.46678 14.2273 8.87317 14.7735 9.47353C15.3198 10.0739 15.6559 10.8356 15.7313 11.6438" />';
}
}
function togglePasswordVisibilityTwo(fieldId) {
function toggleTwoPasswordVisibility(fieldId) {
var field = document.getElementById(fieldId);
var eyeIcon = document.getElementById('eye-icon-two');

Expand Down

0 comments on commit 5b1c09a

Please sign in to comment.