diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js index 61c6ca455..750a563ac 100644 --- a/views/bootstrap4/styles/application.js +++ b/views/bootstrap4/styles/application.js @@ -284,6 +284,21 @@ $(document).ready( function() { $($(this).data("target")+' .modal-header h3').html($(this).data("modal-title")); }); + $('body').on('click', '.show-hide-password a', function(ev){ + ev.preventDefault(); +// console.log($(this).closest('input')); +// console.log($(ev.target).parent().parent().children('input')); + if($('.show-hide-password input').attr("type") == "text"){ + $('.show-hide-password input').attr('type', 'password'); + $('.show-hide-password i').addClass( "fa-eye-slash" ); + $('.show-hide-password i').removeClass( "fa-eye" ); + }else if($('.show-hide-password input').attr("type") == "password"){ + $('.show-hide-password input').attr('type', 'text'); + $('.show-hide-password i').removeClass( "fa-eye-slash" ); + $('.show-hide-password i').addClass( "fa-eye" ); + } + }); + // $('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); }); initMost();