Advertisement
Guest User

Untitled

a guest
Jan 1st, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. <form id="new_user_form">
  2. {% csrf_token %}
  3. <div class="modal-content" data-method="post" id="modalform" >
  4. <div class="modal-header">
  5. <button type="button" class="close" data-dismiss="modal">&times;</button>
  6. <h4 class="modal-title">Sign Up</h4>
  7. </div>
  8. <div onload="validateForm();" class="modal-body">
  9. <div class="form-group">
  10. <label for="usr">Username:</label>
  11. <input type="text" name="username" class="form-control input-sm" id="username">
  12. <label for="eml">Email:</label>
  13. <input type="email" name="emil" class="form-control input-sm" id="emailid">
  14. <label for="passwordd">Password:</label>
  15. <input onchange="checkPasswordMatch();" type="password" name="password" class="form-control input-sm" id="password">
  16. <label for="passwordd">Retype Password:</label>
  17. <input type="password" name="retrypassword" class="form-control input-sm" id="retrypassword">
  18. <br/><div style="color:blue;" id="doesPasswordMatch"> </div>
  19. <span class="help-block">Ensure, You Choose Correct Profession...</span>
  20.  
  21. <label for="inputfile">Upload Profile Picture</label>
  22. <input type="file" id="inputfile">
  23. <p class="help-block">The Profile Picture help people to identify you.</p>
  24. </div role="Form group">
  25. </div role="modal-dialog">
  26. <!--Closing Of Sign Up Modal Page -->
  27. <div class="modal-footer">
  28. <button type="submit" class="btn btn-default" id="submit" onclose="showSuccessMessage();">Submit</button>
  29. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  30. </div role="modal-footer">
  31. </div role="modal content">
  32.  
  33. <script type="text/javascript">
  34. function checkPasswordMatch(){
  35. if ( $('#password').val() == $('#retrypassword').val() )
  36. $('#doesPasswordMatch').html("<h4> Match </h4>").css('color','rgb(34,139,34)');
  37. else
  38. $('#doesPasswordMatch').html("<h4> Does not match </h4>").css('color','rgb(128,0,0)');
  39.  
  40. }
  41. $(document).ready(function() {
  42. $('#submit').attr('disable',true);
  43. $('#retrypassword').keyup(checkPasswordMatch);
  44. if ( $('#username').val() == '' || $('#email').val() == '' || $('#password').val() == '')
  45. $('#submit').attr('disable',false);
  46. });
  47. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement