Reveal token input fields if blank

This commit is contained in:
JonnyWong16 2021-04-10 10:35:24 -07:00
commit 40e0db4f70
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
5 changed files with 31 additions and 10 deletions

View file

@ -2267,6 +2267,7 @@ $(document).ready(function() {
getMobileDevicesTable();
loadUpdateDistros();
setBaseURLSuffix();
toggleRevealTokens();
settingsChanged = false;
}
@ -3204,16 +3205,7 @@ $(document).ready(function() {
openBrowsePath(null, path, filter, description, target);
});
$('body').on('click', '.reveal-token', function() {
var input = $(this).parent().next('input');
if (input.prop('type') === 'password') {
input.prop('type', 'text');
$(this).children('.fa').removeClass('fa-eye-slash').addClass('fa-eye');
} else {
input.prop('type', 'password');
$(this).children('.fa').removeClass('fa-eye').addClass('fa-eye-slash');
}
});
toggleRevealTokens();
});
</script>
</%def>