Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Nov 3, 2023
1 parent a5a3987 commit d9593ad
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
19 changes: 19 additions & 0 deletions portal/static/portal/js/organisation_manage.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,23 @@ $(document).ready(() => {
$('#current-password-field-icon').attr('data-icon', dataIcon);
}
);

$('#delete-account, #delete-indy-account').on(
'click',
'#delete-password-field-icon',
() => {
let inputType;
let dataIcon = $('#delete-password-field-icon').attr('data-icon');
if (dataIcon === 'material-symbols:visibility') {
inputType = 'password';
dataIcon = 'material-symbols:visibility-off';
} else {
inputType = 'text';
dataIcon = 'material-symbols:visibility';
}

$('#id_delete_password').attr('type', inputType);
$('#delete-password-field-icon').attr('data-icon', dataIcon);
}
);
});
2 changes: 1 addition & 1 deletion portal/static/portal/js/resetPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $(document).ready(() => {

$('#id_new_password1').attr('type', inputType);
$('#id_new_password2').attr('type', inputType);

$('#password-field-icon').attr('data-icon', dataIcon);
$('#confirm-password-field-icon').attr('data-icon', dataIcon);
}
Expand Down
4 changes: 2 additions & 2 deletions portal/templates/portal/play/student_edit_account.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ <h5>Delete account</h5>
<div class="row form--row">
<div class="form--row__input col-sm-6 col-md-4">
<div class="input--icon">
{{ delete_account_form.delete_password }}
<span class="iconify" data-icon="mdi:security"></span>
{{ delete_account_form.delete_password }}
<span id="delete-password-field-icon" class="iconify" data-icon="material-symbols:visibility-off"></span>
</div>
<small>{{ delete_account_form.delete_password.help_text }}</small>
{{ delete_account_form.delete_password.errors }}
Expand Down
2 changes: 1 addition & 1 deletion portal/templates/portal/teach/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ <h5>Delete account</h5>
<div class="form--row__input col-sm-6 col-md-4">
<div class="input--icon">
{{ delete_account_form.delete_password }}
<span class="iconify" data-icon="mdi:security"></span>
<span id="delete-password-field-icon" class="iconify" data-icon="material-symbols:visibility-off"></span>
</div>
<small>{{ delete_account_form.delete_password.help_text }}</small>
{{ delete_account_form.delete_password.errors }}
Expand Down

0 comments on commit d9593ad

Please sign in to comment.