edit.blade.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <title>用户 | Yunshop</title>
  7. <!-- Tell the browser to be responsive to screen width -->
  8. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  9. <!-- Bootstrap 3.3.6 -->
  10. <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
  11. <!-- Font Awesome -->
  12. <link rel="stylesheet" href="/libs/font-awesome/4.5.0/css/font-awesome.min.css">
  13. <!-- Ionicons -->
  14. <link rel="stylesheet" href="/libs/ionicons/2.0.1/css/ionicons.min.css">
  15. <!-- Theme style -->
  16. <link rel="stylesheet" href="/dist/css/AdminLTE.min.css">
  17. <!-- iCheck -->
  18. <link rel="stylesheet" href="/plugins/iCheck/square/blue.css">
  19. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  20. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  21. <!--[if lt IE 9]>
  22. <script src="/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
  23. <script src="/libs/respond/1.4.2/respond.min.js"></script>
  24. <![endif]-->
  25. </head>
  26. <body class="hold-transition login-page">
  27. <div class="main animsition">
  28. <div class="container-fluid">
  29. <div class="row">
  30. <div class="col-md-8 col-md-offset-2">
  31. <div class="panel panel-default">
  32. <div class="panel-heading">
  33. <h3 class="panel-title">添加用户</h3>
  34. </div>
  35. <div class="panel-body">
  36. <form class="form-horizontal" role="form" method="POST" action="/admin/user/{{ $id }}/edit">
  37. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  38. <input type="hidden" name="id" value="{{ $id }}">
  39. @if (count($errors) > 0)
  40. <div class="alert alert-danger">
  41. <button type="button" class="close" data-dismiss="alert">×</button>
  42. <strong>出错了!</strong>
  43. <ul>
  44. @foreach ($errors->all() as $error)
  45. <li>{{ $error }}</li>
  46. @endforeach
  47. </ul>
  48. </div>
  49. @endif
  50. <div class="form-group">
  51. <label for="tag" class="col-md-3 control-label">用户名</label>
  52. <div class="col-md-5">
  53. <input type="text" class="form-control" name="name" id="tag" value="{{ $name }}" autofocus>
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label for="tag" class="col-md-3 control-label">邮箱</label>
  58. <div class="col-md-5">
  59. <input type="text" class="form-control" name="email" id="tag" value="{{ $email }}" autofocus>
  60. </div>
  61. </div>
  62. <div class="form-group">
  63. <label for="tag" class="col-md-3 control-label">密码</label>
  64. <div class="col-md-5">
  65. <input type="password" class="form-control" name="password" id="tag" value="" autofocus>
  66. </div>
  67. </div>
  68. <div class="form-group">
  69. <label for="tag" class="col-md-3 control-label">密码确认</label>
  70. <div class="col-md-5">
  71. <input type="password" class="form-control" name="password_confirmation" id="tag" value="" autofocus>
  72. </div>
  73. </div>
  74. <div class="form-group">
  75. <label for="tag" class="col-md-3 control-label">角色列表</label>
  76. @if(isset($id)&&$id==1)
  77. <div class="col-md-4" style="float:left;padding-left:20px;margin-top:8px;"><h2>超级管理员</h2></div>
  78. @else
  79. <div class="col-md-6">
  80. @foreach($rolesAll as $v)
  81. <div class="col-md-4" style="float:left;padding-left:20px;margin-top:8px;">
  82. <span class="checkbox-custom checkbox-default">
  83. <i class="fa"></i>
  84. <input class="form-actions"
  85. @if(in_array($v['id'],$roles))
  86. checked
  87. @endif
  88. id="inputChekbox{{$v['id']}}" type="Checkbox" value="{{$v['id']}}"
  89. name="roles[]"> <label for="inputChekbox{{$v['id']}}">
  90. {{$v['name']}}
  91. </label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  92. </span>
  93. </div>
  94. @endforeach
  95. </div>
  96. @endif
  97. </div>
  98. <div class="form-group">
  99. <div class="col-md-7 col-md-offset-3">
  100. <button type="submit" class="btn btn-primary btn-md">
  101. <i class="fa fa-plus-circle"></i>
  102. 保存
  103. </button>
  104. </div>
  105. </div>
  106. </form>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. <!-- /.login-box -->
  114. <!-- jQuery 2.2.0 -->
  115. <script src="/plugins/jQuery/jQuery-2.2.0.min.js"></script>
  116. <!-- Bootstrap 3.3.6 -->
  117. <script src="/bootstrap/js/bootstrap.min.js"></script>
  118. <!-- iCheck -->
  119. <script src="/plugins/iCheck/icheck.min.js"></script>
  120. <script>
  121. $(function () {
  122. $('input').iCheck({
  123. checkboxClass: 'icheckbox_square-blue',
  124. radioClass: 'iradio_square-blue',
  125. increaseArea: '20%' // optional
  126. });
  127. });
  128. </script>
  129. </body>
  130. </html>