reset_password.html 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. {% extends "layout.html" %}
  2. {% block head %}
  3. {{ super() }}
  4. <style type="text/css">
  5. label>span {
  6. color: deepskyblue;
  7. }
  8. .btn,
  9. .content-box,
  10. .form-group>div>div,
  11. .form-control {
  12. border-radius: 0 !important;
  13. }
  14. .form-horizontal > .form-group {
  15. margin: 0;
  16. }
  17. html,body {
  18. height: 100%;
  19. }
  20. .page-box .server-message {
  21. padding: 35px 0;
  22. }
  23. body {
  24. overflow: hidden;
  25. }
  26. </style>
  27. {% endblock head %}
  28. {% block body %}
  29. <script type="text/javascript">
  30. $(document).ready(function() {
  31. $('body').addClass('add-transition');
  32. $('.add-page-transition').on('click', function(){
  33. var transAttr = $(this).attr('data-transition');
  34. $('.add-transition').attr('class', 'add-transition');
  35. $('.add-transition').addClass(transAttr);
  36. });
  37. $('#reset_password_form').formValidation({
  38. framework: 'bootstrap4',
  39. icon: {
  40. valid: 'fa fa-check',
  41. invalid: 'fa fa-times',
  42. validating: 'fa fa-refresh'
  43. },
  44. // Since the Bootstrap Button hides the radio and checkbox
  45. // We exclude the disabled elements only
  46. excluded: ':disabled',
  47. locale: 'zh_CN',
  48. fields: {
  49. password: {
  50. validators: {
  51. notEmpty: {
  52. },
  53. stringLength: {
  54. min: 6,
  55. max: 128
  56. }
  57. }
  58. }
  59. }
  60. })
  61. .on('success.field.fv', function(e, data) {
  62. if (data.fv.getInvalidFields().length > 0) { // There is invalid field
  63. data.fv.disableSubmitButtons(true);
  64. }
  65. })
  66. });
  67. </script>
  68. <div class="center-vertical">
  69. <div class="center-content row wow">
  70. <form id="reset_password_form" class="col-md-4 col-sm-5 col-xs-11 col-lg-3 center-margin" action="/reset_password/{{ token }}" method="post">
  71. <h3 class="text-center pad25B font-primary" style="font-family: 'serif'; opacity: 0.83; font-size: -webkit-xxx-large;">设置新密码</h3>
  72. <div id="login-form" class="content-box bg-default">
  73. <div class="content-box-wrapper pad20A">
  74. <div class="form-group">
  75. <div class="input-group">
  76. <span class="input-group-addon addon-inside bg-gray">
  77. <i class="glyph-icon icon-lock"></i>
  78. </span>
  79. <input type="password" class="form-control" id="password" name="password" placeholder="新密码">
  80. </div>
  81. </div>
  82. <div class="form-group" style="margin-bottom: 10px;">
  83. <button type="submit" id="login_submit" class="btn btn-block btn-primary" disabled>下一步</button>
  84. </div>
  85. </div>
  86. </div>
  87. </form>
  88. </div>
  89. </div>
  90. {% endblock body %}