edit.blade.php 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. @extends('admin/public/layout')
  2. @section('title')编辑专家认证信息@endsection
  3. @section('content')
  4. <section class="content-header">
  5. <h1>编辑专家认证信息</h1>
  6. </section>
  7. <section class="content">
  8. <div class="row">
  9. <div class="col-xs-12">
  10. <div class="box box-primary">
  11. <form role="form" name="editForm" method="POST" enctype="multipart/form-data" action="{{ route('admin.authentication.update',['id'=>$authentication->user_id]) }}">
  12. <input name="_method" type="hidden" value="PUT">
  13. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  14. <div class="box-body">
  15. <div class="form-group">
  16. <label>头像</label>
  17. <input type="file" name="id_card_image" />
  18. @if($authentication->id_card_image)
  19. <div style="margin-top: 10px;">
  20. <img class="img-responsive" width="400" src="{{ $authentication->id_card_image }}" style="height:100px;width:auto;"/>
  21. </div>
  22. @endif
  23. </div>
  24. <div class="form-group @if($errors->has('real_name')) has-error @endif">
  25. <label>真实姓名</label>
  26. <input type="text" name="real_name" class="form-control " placeholder="真实姓名" value="{{ old('real_name',$authentication->real_name) }}">
  27. @if($errors->has('real_name')) <p class="help-block">{{ $errors->first('real_name') }}</p> @endif
  28. </div>
  29. <div class="form-group ">
  30. <label for="time_friendly">性别</label>
  31. <div class="radio">
  32. <label><input type="radio" name="gender" value="1" @if ( $authentication->gender === 1) checked @endif >男</label>&nbsp;&nbsp;&nbsp;&nbsp;
  33. <label><input type="radio" name="gender" value="2" @if ( $authentication->gender === 2) checked @endif >女</label>&nbsp;&nbsp;&nbsp;&nbsp;
  34. <label><input type="radio" name="gender" value="0" @if ( $authentication->gender === 0) checked @endif >保密</label>
  35. </div>
  36. </div>
  37. <div class="form-group">
  38. <label for="setting-city" class="control-label">所在城市</label>
  39. <div class="row">
  40. <div class="col-sm-5">
  41. <select class="form-control" name="province" id="province">
  42. <option>请选择省份</option>
  43. @foreach($data['provinces'] as $province)
  44. <option value="{{ $province->id }}" @if($authentication->province == $province->id) selected @endif>{{ $province->name }}</option>
  45. @endforeach
  46. </select>
  47. </div>
  48. <div class="col-sm-5">
  49. <select class="form-control" name="city" id="city">
  50. <option>请选择城市</option>
  51. @foreach($data['cities'] as $city)
  52. <option value="{{ $city->id }}" @if($authentication->city == $city->id) selected @endif >{{ $city->name }}</option>
  53. @endforeach
  54. </select>
  55. </div>
  56. </div>
  57. </div>
  58. <div class="form-group @if ($errors->has('title')) has-error @endif">
  59. <label for="name">身份职业</label>
  60. <input type="text" name="title" class="form-control " placeholder="身份职业" value="{{ old('title',$authentication->title) }}">
  61. @if ($errors->has('title')) <p class="help-block">{{ $errors->first('title') }}</p> @endif
  62. </div>
  63. <div class="form-group @if ($errors->has('description')) has-error @endif">
  64. <label for="name">自我介绍</label>
  65. <textarea name="description" class="form-control " placeholder="自我介绍">{{ old('description',$authentication->description) }}</textarea>
  66. @if ($errors->has('description')) <p class="help-block">{{ $errors->first('description') }}</p> @endif
  67. </div>
  68. <div class="form-group @if($errors->has('id_card')) has-error @endif">
  69. <label>身份证号码</label>
  70. <input type="text" name="id_card" class="form-control " placeholder="身份证号码" value="{{ old('id_card',$authentication->id_card) }}">
  71. @if($errors->has('id_card')) <p class="help-block">{{ $errors->first('id_card') }}</p> @endif
  72. </div>
  73. <div class="form-group">
  74. <label>所属分类</label>
  75. <select name="category_id" class="form-control">
  76. <option value="0">选择分类</option>
  77. @include('admin.category.option',['type'=>'experts','select_id'=>$authentication->category_id])
  78. </select>
  79. </div>
  80. <div class="form-group @if($errors->has('skill')) has-error @endif">
  81. <label>认证领域</label>
  82. <input type="text" name="skill" class="form-control " placeholder="认证领域" value="{{ old('skill',$authentication->skill) }}">
  83. @if($errors->has('skill')) <p class="help-block">{{ $errors->first('skill') }}</p> @endif
  84. </div>
  85. <div class="form-group">
  86. <label>专业性证明文件</label>
  87. <input type="file" name="skill_image" />
  88. @if($authentication->skill_image)
  89. <div style="margin-top: 10px;">
  90. <img class="img-responsive" width="400" src="{{ $authentication->skill_image }}" style="height:100px;width:auto;"/>
  91. </div>
  92. @endif
  93. </div>
  94. <div class="form-group">
  95. <label>状态</label>
  96. <span class="text-muted">(禁用后前台不会显示)</span>
  97. <div class="radio">
  98. <label>
  99. <input type="radio" name="status" value="0" @if($authentication->status === 0) checked @endif /> 待审核
  100. </label>&nbsp;&nbsp;
  101. <label>
  102. <input type="radio" name="status" value="1" @if($authentication->status === 1) checked @endif /> 通过审核
  103. </label>&nbsp;&nbsp;
  104. <label>
  105. <input type="radio" name="status" value="4" @if($authentication->status === 4 ) checked @endif /> 审核失败
  106. </label>
  107. </div>
  108. </div>
  109. <div class="form-group">
  110. <label>审核失败的原因</label>
  111. <textarea class="form-control" name="failed_reason" placeholder="仅审核失败的情况下填写"></textarea>
  112. </div>
  113. <div class="form-group">
  114. <label>推荐</label>
  115. <span class="text-muted">(推荐后会按照推荐时间显示到首页)</span>
  116. <div class="radio">
  117. @foreach( trans_common_bool('all') as $key => $name )
  118. <label><input type="radio" name="is_recommend" value="{{ $key }}" @if( $authentication->recommend_at === $key) checked @endif /> {{ $name }}</label>&nbsp;&nbsp;
  119. @endforeach
  120. </div>
  121. </div>
  122. </div>
  123. <div class="box-footer">
  124. <button type="submit" class="btn btn-primary">保存</button>
  125. <button type="reset" class="btn btn-success">重置</button>
  126. </div>
  127. </form>
  128. </div>
  129. </div>
  130. </div>
  131. </section>
  132. @endsection
  133. @section('script')
  134. <script type="text/javascript">
  135. $(function(){
  136. set_active_menu('manage_user',"{{ route('admin.authentication.index') }}");
  137. /*加载省份城市*/
  138. $("#province").change(function(){
  139. var province_id = $(this).val();
  140. $("#city").load("{{ url('ajax/loadCities') }}/"+province_id);
  141. });
  142. });
  143. </script>
  144. @endsection