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.

66 lines
2.5 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. @extends('admin.layouts.app')
  2. @section('title', '管理员修改')
  3. @section('content')
  4. <h5 class="sub-header"><a href="/fladmin/user">管理员列表</a> > 管理员修改</h5>
  5. <form id="addarc" method="post" action="/fladmin/user/doedit" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
  6. <table class="table table-striped table-bordered">
  7. <tbody>
  8. <tr>
  9. <td align="right">用户名:</td>
  10. <td><input name="username" type="text" id="username" value="<?php echo $post["username"]; ?>" class="required" style="width:30%" placeholder="在此输入用户名"><input style="display:none;" type="text" name="id" id="id" value="<?php echo $id; ?>"></td>
  11. </tr>
  12. <tr>
  13. <td align="right">密码:</td>
  14. <td><input name="pwd" type="password" id="pwd" value="" class="required" style="width:30%"></td>
  15. </tr>
  16. <tr>
  17. <td align="right">邮箱:</td>
  18. <td><input name="email" type="text" id="email" value="<?php echo $post["email"]; ?>" style="width:30%"></td>
  19. </tr>
  20. <tr>
  21. <td align="right">角色:</td>
  22. <td>
  23. <select name="role_id" id="role_id">
  24. <?php if($rolelist){foreach($rolelist as $row){ ?>
  25. <?php if($post["role_id"]==$row["id"]){ ?>
  26. <option selected value="<?php echo $row["id"]; ?>"><?php echo $row["name"]; ?></option>
  27. <?php }else{ ?>
  28. <option value="<?php echo $row["id"]; ?>"><?php echo $row["name"]; ?></option>
  29. <?php }}} ?>
  30. </select>
  31. </td>
  32. </tr>
  33. <tr>
  34. <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></td>
  35. </tr>
  36. </tbody></table></form><!-- 表单结束 -->
  37. <script>
  38. $(function(){
  39. $(".required").blur(function(){
  40. var $parent = $(this).parent();
  41. $parent.find(".formtips").remove();
  42. if(this.value=="")
  43. {
  44. $parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
  45. }
  46. else
  47. {
  48. $parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
  49. }
  50. });
  51. //重置
  52. $('#addarc input[type="reset"]').click(function(){
  53. $(".formtips").remove();
  54. });
  55. $("#addarc").submit(function(){
  56. $(".required").trigger('blur');
  57. var numError = $('#addarc .onError').length;
  58. if(numError){return false;}
  59. });
  60. });
  61. </script>
  62. @endsection