Files
djangocms/static/admin/assets/js/login.js
T
2024-11-20 12:56:32 +07:00

23 lines
827 B
JavaScript

(function ($) {
"use strict";
/*----------------------------------------
passward show hide
----------------------------------------*/
$('.show-hide').show();
$('.show-hide span').addClass('show');
$('.show-hide span').click(function () {
if ($(this).hasClass('show')) {
$('input[name="login[password]"]').attr('type', 'text');
$(this).removeClass('show');
} else {
$('input[name="login[password]"]').attr('type', 'password');
$(this).addClass('show');
}
});
$('form button[type="submit"]').on('click', function () {
$('.show-hide span').text('Show').addClass('show');
$('.show-hide').parent().find('input[name="login[password]"]').attr('type', 'password');
});
})(jQuery);