changepwd.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. $(function(){
  2. $(".signin-form").validate({
  3. submitHandler:(form) => {
  4. zeroModal.success({
  5. unique:'1',
  6. opacity:0.8,
  7. content:'success',
  8. contentDetail:'You have successfully change password',
  9. width:'300px',
  10. height:'260px',
  11. ok:false,
  12. onClosed:function(){
  13. },
  14. onComplete:function(evn){
  15. console.log('onComplete')
  16. setTimeout(function(){
  17. zeroModal.close('1');
  18. },3000);
  19. }
  20. })
  21. }
  22. });
  23. $(".form-control").on("input",function(evn){
  24. //console.log('input');
  25. let $icon=$(this).siblings('.input-tool-icon');
  26. if($(this).val().length>0){
  27. $icon.show();
  28. }
  29. else{
  30. $icon.hide();
  31. }
  32. });
  33. $(".form-group-custom").on("click",".glyphicon-remove",function(evn){
  34. $(this).siblings('.form-control').val('');
  35. $(this).hide();
  36. });
  37. $(".form-group-custom").on("click",".glyphicon-eye-open",function(evn){
  38. $(this).siblings('.form-control').prop('type','text');
  39. $(this).removeClass('glyphicon-eye-open');
  40. $(this).addClass('glyphicon-eye-close');
  41. });
  42. $(".form-group-custom").on("click",".glyphicon-eye-close",function(evn){
  43. $(this).siblings('.form-control').prop('type','password');
  44. $(this).removeClass('glyphicon-eye-close');
  45. $(this).addClass('glyphicon-eye-open');
  46. });
  47. });