You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.4 KiB

8 years ago
  1. <!DOCTYPE html><html><head><title>密码修改_后台管理</title>@include('admin.common.header')
  2. <div class="container-fluid">
  3. <div class="row">
  4. <!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
  5. <style>.input-error{background-color:#ffe7e7;}</style>
  6. <!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
  7. <h2 class="sub-header">密码修改</h2>
  8. <form id="addarc" method="post" action="/fladmin/user/doedit" class="table-responsive" role="form">{{ csrf_field() }}
  9. <table class="table table-striped table-bordered">
  10. <tbody>
  11. <tr>
  12. <td align="right">用户名:</td>
  13. <td><input name="username" type="text" class="" id="username" value="<?php echo $post["username"]; ?>" style="width:30%"></td>
  14. </tr>
  15. <tr>
  16. <td align="right">旧密码:</td>
  17. <td><input name="oldpwd" type="password" class="" id="oldpwd" value="" style="width:30%"></td>
  18. </tr>
  19. <tr>
  20. <td align="right">新密码:</td>
  21. <td><input name="newpwd" type="password" class="" id="newpwd" value="" style="width:30%"></td>
  22. </tr>
  23. <tr>
  24. <td align="right">确认密码:</td>
  25. <td><input name="newpwd2" type="password" class="" id="newpwd2" value="" style="width:30%"></td>
  26. </tr>
  27. <tr>
  28. <td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button>&nbsp;&nbsp;<button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button><input type="hidden"></input></td>
  29. </tr>
  30. </tbody></table></form><!-- 表单结束 -->
  31. </div></div><!-- 右边结束 --></div></div>
  32. <script>
  33. $('#addarc input[type="text"], #addarc input[type="password"]').on('focus', function() {
  34. $(this).removeClass('input-error');
  35. });
  36. $('#addarc').on('submit', function(e) {
  37. $(this).find('input[type="text"], input[type="password"]').each(function(){
  38. if( $(this).val() == "" ) {
  39. e.preventDefault();
  40. $(this).addClass('input-error');
  41. }
  42. else {
  43. $(this).removeClass('input-error');
  44. }
  45. });
  46. if($('#newpwd').val()!=$('#newpwd2').val() || $('#newpwd').val()=='')
  47. {
  48. e.preventDefault();
  49. $('#newpwd').addClass('input-error');
  50. $('#newpwd2').addClass('input-error');
  51. }
  52. else {
  53. $('#newpwd').removeClass('input-error');
  54. $('#newpwd2').removeClass('input-error');
  55. }
  56. });
  57. </script>
  58. </body></html>