Guest User

Untitled

a guest
Feb 6th, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. <form name="form" id="loginform" class="lm-login-form" method="post" action="./?_task=login">
  2. <div id="userid" class="lm-login-item">
  3. <div class="lm-login-label">
  4. <label for="rcmloginuser"><roundcube:label name="mail" /></label>
  5. </div>
  6. <div class="lm-login-field">
  7. <input name="_user" id="rcmloginuser">
  8. </div>
  9. </div>
  10.  
  11. <div id="pwdid" class="lm-login-item">
  12. <div class="lm-login-label">
  13. <label for="rcmloginpwd"><roundcube:label name="password" /></label>
  14. </div>
  15. <div class="lm-login-field">
  16. <input name="_pass" id="rcmloginpwd" type="password">
  17. <a href="#" id="showpass">Exibir</a>
  18. </div>
  19. </div>
  20.  
  21. <p class="formbuttons">
  22. <input type="submit" id="submitloginform" class="lm-login-submit" value="Entrar">
  23. </p>
  24. </form>
  25.  
  26. $(document).ready(function() {
  27. $( '#loginform' ).validate({
  28. rules: {
  29. _user: {
  30. required: true,
  31. email: true
  32. },
  33. _pass: {
  34. required: true
  35. }
  36. },
  37. });
  38. });
  39.  
  40. $(document).ready(function(){
  41. checkInput = setInterval(function(){
  42. var autoCompleted = false;
  43. $("#loginform input").each(function(input){
  44. input = $("#loginform input").eq(input);
  45. if($(input).val()){
  46. $(input).val($(input).val());
  47. $(input).change();
  48. autoCompleted = true;
  49. }
  50. if(autoCompleted){
  51. clearInterval(checkInput);
  52. }
  53. })
  54. }, 10);
  55. $("#loginform input").focus(function(){
  56. $(this).change();
  57. $(this).val($(this).val());
  58. });
  59. $( '#loginform' ).validate({
  60. rules: {
  61. _user: {
  62. required: true,
  63. email: true
  64. },
  65. _pass: {
  66. required: true
  67. }
  68. },
  69. });
  70. })
Add Comment
Please, Sign In to add comment