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.

60 lines
2.4 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. @extends('admin.layouts.app')
  2. @section('title', '角色修改')
  3. @section('content')
  4. <h5 class="sub-header"><a href="/fladmin/userrole">角色列表</a> > 角色修改</h5>
  5. <form id="addarc" method="post" action="/fladmin/userrole/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="name" type="text" id="name" value="<?php echo $post["name"]; ?>" class="required" style="width:30%" placeholder="在此输入角色名称"><input style="display:none;" name="id" type="text" id="id" value="<?php echo $id; ?>"></td>
  11. </tr>
  12. <tr>
  13. <td align="right">角色描述:</td>
  14. <td><input name="des" type="text" id="des" value="<?php echo $post["des"]; ?>" style="width:60%"></td>
  15. </tr>
  16. <tr>
  17. <td align="right">状态:</td>
  18. <td>
  19. <input type="radio" value='0' name="status" <?php if($post['status']==0){echo 'checked';} ?> />&nbsp;启用&nbsp;&nbsp;
  20. <input type="radio" value='1' name="status" <?php if($post['status']==1){echo 'checked';} ?> />&nbsp;禁用
  21. </td>
  22. </tr>
  23. <tr>
  24. <td align="right">排序:</td>
  25. <td><input name="listorder" type="text" id="listorder" value="<?php echo $post["listorder"]; ?>" style="width:60%"></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></td>
  29. </tr>
  30. </tbody></table></form><!-- 表单结束 -->
  31. <script>
  32. $(function(){
  33. $(".required").blur(function(){
  34. var $parent = $(this).parent();
  35. $parent.find(".formtips").remove();
  36. if(this.value=="")
  37. {
  38. $parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
  39. }
  40. else
  41. {
  42. $parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
  43. }
  44. });
  45. //重置
  46. $('#addarc input[type="reset"]').click(function(){
  47. $(".formtips").remove();
  48. });
  49. $("#addarc").submit(function(){
  50. $(".required").trigger('blur');
  51. var numError = $('#addarc .onError').length;
  52. if(numError){return false;}
  53. });
  54. });
  55. </script>
  56. @endsection