Guest User

Untitled

a guest
Jan 20th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.11 KB | None | 0 0
  1. <form class="form-horizontal msform" action="#" method="POST" id="myform">
  2. <!-- INICIO PRIMEIRA ETAPA -->
  3. <fieldset id="account_information" class="">
  4. <div class="form-group">
  5. <input type="email" class="form-control form-login input-login-email" id="" name="email" placeholder="Digite seu Email">
  6. </div>
  7. <small class="small-login-email">Ao acessar, concordo com os <a href="#" target="_blank">Termos de Uso</a>.</small>
  8. <p><a class="btn btn-success btn-1 btnlogin col-md-offset-10 col-sm-offset-10 a-login-email next">Próximo</a></p>
  9. </fieldset>
  10. <!-- FIM PRIMEIRA ETAPA -->
  11. <!-- CARREGAMENTO AO MEIO -->
  12. <fieldset id="loading_information">
  13. <div style="text-align: center;position: relative;top: 105px;">
  14. <div class="sk-spinner sk-spinner-wave">
  15. <div class="sk-rect1" style="background-color: #1212b1"></div>
  16. <div class="sk-rect2" style="background-color: #1212b1"></div>
  17. <div class="sk-rect3" style="background-color: #1212b1"></div>
  18. <div class="sk-rect4" style="background-color: #1212b1"></div>
  19. <div class="sk-rect5" style="background-color: #1212b1"></div>
  20. </div>
  21. </div>
  22. <p><a class="btn btn-success btn-1 btnlogin col-md-offset-10 col-sm-offset-10 a-login-email next">Próximo</a></p>
  23. </fieldset>
  24. <!-- FIM CARREGAMENTO AO MEIO -->
  25. <!-- INICIO SEGUNDA ETAPA -->
  26. <fieldset id="company_information" class="animated fadeInDown">
  27. <div class="form-group">
  28. <input type="password" class="form-control form-login input-login-pass" id="company" name="company" placeholder="Digite sua Senha">
  29. </div>
  30. <small class="small-login-pass">&nbsp;<a href="#" target="_blank">Esqueci minha senha</a>
  31. <p><input style="" class="btn btn-success btn-1 col-md-offset-10 col-sm-offset-10 submit-login-pass" type="submit" value="Acessar"></p>
  32. </fieldset>
  33. <!-- FIM SEGUNDA ETAPA -->
  34.  
  35. $(document).ready(function(){
  36.  
  37. // Custom method to validate username
  38. $.validator.addMethod("usernameRegex", function(value, element) {
  39. return this.optional(element) || /^[a-zA-Z0-9]*$/i.test(value);
  40. }, "Usuário pode conter apenas letras ou números.");
  41.  
  42. $(".next").click(function(){
  43. var form = $("#myform");
  44. form.validate({
  45. errorElement: 'span',
  46. errorClass: 'help-block',
  47. highlight: function(element, errorClass, validClass) {
  48. $(element).closest('.form-group').addClass("has-error");
  49. },
  50. unhighlight: function(element, errorClass, validClass) {
  51. $(element).closest('.form-group').removeClass("has-error");
  52. },
  53. rules: {
  54. username: {
  55. required: true,
  56. usernameRegex: true,
  57. minlength: 6,
  58. },
  59. password : {
  60. required: true,
  61. },
  62. conf_password : {
  63. required: true,
  64. equalTo: '#pwd',
  65. },
  66. company:{
  67. required: true,
  68. },
  69. url:{
  70. required: true,
  71. },
  72. name: {
  73. required: true,
  74. minlength: 3,
  75. },
  76. email: {
  77. required: true,
  78. minlength: 3,
  79. },
  80.  
  81. },
  82. messages: {
  83. username: {
  84. required: "",
  85. },
  86. password : {
  87. required: "",
  88. },
  89. conf_password : {
  90. required: "",
  91. equalTo: "",
  92. },
  93. name: {
  94. required: "",
  95. },
  96. email: {
  97. required: "",
  98. },
  99. }
  100. });
  101. if (form.valid() === true){
  102. if ($('#account_information').is(":visible")){
  103. current_fs = $('#account_information');
  104. next_fs = $('#company_information');
  105. }
  106. else if($('#company_information').is(":visible")){
  107. current_fs = $('#company_information');
  108. next_fs = $('#personal_information');
  109. }
  110.  
  111. next_fs.show();
  112. current_fs.hide();
  113. }
  114. });
  115.  
  116. $('#previous').click(function(){
  117. if($('#company_information').is(":visible")){
  118. current_fs = $('#company_information');
  119. next_fs = $('#account_information');
  120. }
  121. else if ($('#personal_information').is(":visible")){
  122. current_fs = $('#personal_information');
  123. next_fs = $('#company_information');
  124. }
  125. next_fs.show();
  126. current_fs.hide();
  127. });
  128.  
  129. });
Add Comment
Please, Sign In to add comment