modify_password.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <{include file="./admin/header.html"}>
  2. <{include file="./admin/left.html"}>
  3. <{include file="./admin/nav.html"}>
  4. <{if $successMsg}>
  5. <div class="tip_message_success"><{$successMsg}></div>
  6. <{/if}>
  7. <{if $errMsg}>
  8. <div class="tip_message_fail"><{$errMsg}></div>
  9. <{/if}>
  10. <div style="width:400px;">
  11. <form class="form-horizontal" role="form" method="post">
  12. <div class="form-group">
  13. <label for="t1" class="col-sm-3 control-label">用户名:</label>
  14. <div class="col-sm-7">
  15. <p class="form-control-static"><{$user.name}></p>
  16. </div>
  17. </div>
  18. <div class="form-group">
  19. <label for="t2" class="col-sm-3 control-label">原始密码:</label>
  20. <div class="col-sm-7">
  21. <input name='oldPassword' type="password" class="form-control" id="t2">
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label class="col-sm-3 control-label">新密码:</label>
  26. <div class="col-sm-7">
  27. <input name='newPassword' type="password" class="form-control" placeholder="新密码不能小于6位">
  28. </div>
  29. </div>
  30. <div class="form-group">
  31. <label class="col-sm-3 control-label">确认密码:</label>
  32. <div class="col-sm-7">
  33. <input id="confirmPass" type="password" class="form-control">
  34. </div>
  35. </div>
  36. <div class="form-group">
  37. <div class="col-sm-offset-3 col-sm-7">
  38. <button type="submit" class="btn btn-primary btn-sm">提交</button>
  39. </div>
  40. </div>
  41. </form>
  42. </div>
  43. <script>
  44. KISSY.use('node', function (S, Node) {
  45. var $ = S.all;
  46. $('button').on('click', function () {
  47. var oldPassword = $('input[name=oldPassword]').val();
  48. if (!S.trim(oldPassword)) {
  49. alert('请填写原始密码');
  50. return false;
  51. }
  52. var newPassword = $('input[name=newPassword]').val();
  53. if (!S.trim(newPassword)) {
  54. alert('请填写新密码');
  55. return false;
  56. }
  57. var confirmPass = $('#confirmPass').val();
  58. if (!S.trim(confirmPass)) {
  59. alert('请填写确认密码');
  60. return false;
  61. }
  62. if (newPassword != confirmPass) {
  63. alert('确认密码填写错误');
  64. return false;
  65. }
  66. });
  67. });
  68. </script>
  69. <{include file="./admin/bottom.html"}>