user.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. {{extend 'layout.html'}}
  2. <h2>
  3. {{=T('Sign Up') if request.args(0) == 'register' else T('Log In') if request.args(0) == 'login' else T(request.args(0).replace('_',' ').title())}}
  4. </h2>
  5. <div class="container">
  6. <div class="row">
  7. <div id="web2py_user_form" class="col-lg-6">
  8. {{
  9. if request.args(0)=='login':
  10. if not 'register' in auth.settings.actions_disabled:
  11. form.add_button(T('Sign Up'),URL(args='register', vars={'_next': request.vars._next} if request.vars._next else None),_class='btn btn-default')
  12. pass
  13. if not 'request_reset_password' in auth.settings.actions_disabled:
  14. form.add_button(T('Lost Password'),URL(args='request_reset_password'),_class='btn btn-default')
  15. pass
  16. pass
  17. =form
  18. }}
  19. </div>
  20. </div>
  21. </div>
  22. {{block page_js}}
  23. <script>
  24. jQuery("#web2py_user_form input:visible:enabled:first").focus();
  25. {{if request.args(0)=='register':}}
  26. web2py_validate_entropy(jQuery('#auth_user_password'),100);
  27. {{elif request.args(0)=='change_password':}}
  28. web2py_validate_entropy(jQuery('#no_table_new_password'),100);
  29. {{pass}}
  30. </script>
  31. {{end page_js}}