edit.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. @extends('theme::layout.public')
  2. @section('seo_title')专家认证 - {{ Setting()->get('website_name') }}@endsection
  3. @section('css')
  4. <link href="{{ asset('/static/js/select2/css/select2.min.css')}}" rel="stylesheet">
  5. <link href="{{ asset('/static/js/select2/css/select2-bootstrap.min.css')}}" rel="stylesheet">
  6. @endsection
  7. @section('content')
  8. <div class="row">
  9. <!--左侧菜单-->
  10. @include('theme::layout.profile_menu')
  11. <div id="main" class="settings col-md-10 form-horizontal main">
  12. <h2 class="h3 post-title">专家认证 <small>修改认证资料</small></h2>
  13. <div class="row mt-30">
  14. <div class="col-md-8">
  15. <form name="authForm" id="authentication_form" enctype="multipart/form-data" action="{{ route('auth.authentication.edit')}}" method="POST">
  16. <input type="hidden" name="_token" value="{{ csrf_token() }}" />
  17. <input type="hidden" id="tags" name="skill" value="{{ $authentication->skill }}" />
  18. <div class="form-group @if ($errors->first('real_name')) has-error @endif">
  19. <label for="real_name" class="control-label col-sm-3 required">真实姓名</label>
  20. <div class="col-sm-9">
  21. <input name="real_name" type="text" maxlength="32" placeholder="真实姓名" class="form-control" value="{{ old('real_name',$authentication->real_name) }}" />
  22. @if ($errors->first('real_name'))
  23. <span class="help-block">{{ $errors->first('real_name') }}</span>
  24. @endif
  25. </div>
  26. </div>
  27. <div class="form-group">
  28. <label class="control-label col-sm-3">性别</label>
  29. <div class="col-sm-9">
  30. <label class="radio-inline"><input name="gender" type="radio" value="1" @if( old('gender',$authentication->gender) == 1 ) checked @endif > 男</label>
  31. <label class="radio-inline"><input name="gender" type="radio" value="2" @if( old('gender',$authentication->gender)==2 ) checked @endif> 女</label>
  32. <label class="radio-inline"><input name="gender" type="radio" value="0" @if( old('gender',$authentication->gender)==0 ) checked @endif> 保密</label>
  33. </div>
  34. </div>
  35. <div class="form-group">
  36. <label for="setting-city" class="control-label col-sm-3">所在城市</label>
  37. <div class="col-sm-4">
  38. <select class="form-control" name="province" id="province">
  39. <option>请选择省份</option>
  40. @foreach($areaData['provinces'] as $province)
  41. <option value="{{ $province->id }}" @if( old('province',$authentication->province) == $province->id) selected @endif>{{ $province->name }}</option>
  42. @endforeach
  43. </select>
  44. </div>
  45. <div class="col-sm-5">
  46. <select class="form-control" name="city" id="city">
  47. <option>请选择城市</option>
  48. @foreach($areaData['cities'] as $city)
  49. <option value="{{ $city->id }}" @if( old('city',$authentication->city) == $city->id) selected @endif >{{ $city->name }}</option>
  50. @endforeach
  51. </select>
  52. </div>
  53. </div>
  54. <div class="form-group @if ($errors->first('title')) has-error @endif">
  55. <label for="name" class="control-label col-sm-3">身份职业</label>
  56. <div class="col-sm-9">
  57. <input name="title" id="title" type="text" maxlength="32" placeholder="例如:汽车制造 / 产品设计师 / 登山爱好者" class="form-control" value="{{ old('title',$authentication->title) }}" />
  58. @if ($errors->first('title'))
  59. <span class="help-block">{{ $errors->first('title') }}</span>
  60. @endif
  61. </div>
  62. </div>
  63. <div class="form-group @if ($errors->first('description')) has-error @endif">
  64. <label for="setting-description" class="control-label col-sm-3">自我介绍</label>
  65. <div class="col-sm-9">
  66. <textarea name="description" id="setting-description" class="form-control" rows="6">{{ old('description',$authentication->description) }}</textarea>
  67. @if ($errors->first('description'))
  68. <span class="help-block">{{ $errors->first('description') }}</span>
  69. @endif
  70. </div>
  71. </div>
  72. <div class="form-group @if ($errors->first('id_card')) has-error @endif">
  73. <label for="id_card" class="control-label col-sm-3 required">身份照号码</label>
  74. <div class="col-sm-9">
  75. <input name="id_card" type="text" maxlength="32" placeholder="身份照号码" class="form-control" value="{{ old('id_card',$authentication->id_card) }}" />
  76. @if ($errors->first('id_card'))
  77. <span class="help-block">{{ $errors->first('id_card') }}</span>
  78. @endif
  79. </div>
  80. </div>
  81. <div class="form-group @if ($errors->first('id_card_image')) has-error @endif">
  82. <label id="id_card_image" class="control-label col-sm-3 required">身份照正面照片</label>
  83. <div class="col-sm-9">
  84. <input class="form-control" type="file" name="id_card_image" />
  85. @if ($errors->first('id_card_image'))
  86. <span class="help-block">{{ $errors->first('id_card_image') }}</span>
  87. @else
  88. <div class="help-block">
  89. 1.请上传身份证正面带有头像的扫描件或清晰照片<br />
  90. 2.照片要求格式为JPG/JPEG/GIF/PNG,大小不要超过2M
  91. </div>
  92. @endif
  93. </div>
  94. </div>
  95. <div class="form-group @if ($errors->first('skill')) has-error @endif">
  96. <label for="select_tags" class="control-label col-sm-3 required">认证领域</label>
  97. <div class="col-sm-9">
  98. <select id="select_tags" name="select_tags" class="form-control" multiple="multiple" >
  99. @if($authentication->skill)
  100. @foreach( explode(",",old('tags',$authentication->skill)) as $tag)
  101. <option value="{{ $tag }}" selected>{{ $tag }}</option>
  102. @endforeach
  103. @endif
  104. </select>
  105. @if ($errors->first('skill'))
  106. <span class="help-block">{{ $errors->first('skill') }}</span>
  107. @endif
  108. </div>
  109. </div>
  110. <div class="form-group @if ($errors->first('skill_image')) has-error @endif ">
  111. <label id="skill_image" class="control-label col-sm-3 required">专业性证明</label>
  112. <div class="col-sm-9">
  113. <input class="form-control" type="file" name="skill_image" />
  114. @if ($errors->first('skill_image'))
  115. <span class="help-block">{{ $errors->first('skill_image') }}</span>
  116. @else
  117. <div class="help-block">
  118. 1.请上传您的工卡、单位证明、资格证书、获奖证书等一切可证明您专家身份的材料照片<br />
  119. 2.照片要求格式为JPG/JPEG/GIF/PNG,大小不要超过2M
  120. </div>
  121. @endif
  122. </div>
  123. </div>
  124. <div class="form-group @if ($errors->first('captcha')) has-error @endif">
  125. <label for="captcha" class="required control-label col-sm-3">验证码</label>
  126. <div class="col-sm-4">
  127. <input id="captcha" name="captcha" type="text" maxlength="32" placeholder="请输入下方验证码" class="form-control" value="{{ old('captcha') }}" />
  128. @if ($errors->first('captcha'))
  129. <span class="help-block">{{ $errors->first('captcha') }}</span>
  130. @endif
  131. <div class="mt-10"><a href="javascript:void(0);" id="reloadCaptcha"><img src="{{ captcha_src()}}"></a></div>
  132. </div>
  133. </div>
  134. <div class="form-action row mb-30">
  135. <div class="col-sm-offset-3 col-sm-9">
  136. <button class="btn btn-xl btn-primary profile-sub" type="submit">提交申请</button>
  137. <a class="btn btn-xl btn-default profile-sub" href="{{ route('auth.authentication.index') }}">返回</a>
  138. </div>
  139. </div>
  140. </form>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. @endsection
  146. @section('script')
  147. <script src="{{ asset('/static/js/select2/js/select2.min.js')}}"></script>
  148. <script type="text/javascript">
  149. $(function(){
  150. $("#select_tags").select2({
  151. theme:'bootstrap',
  152. placeholder: "认证领域,例如法律、互联网、电脑等不超过5个词语",
  153. ajax: {
  154. url: '/ajax/loadTags',
  155. dataType: 'json',
  156. delay: 250,
  157. data: function (params) {
  158. return {
  159. word: params.term
  160. };
  161. },
  162. processResults: function (data) {
  163. return {
  164. results: data
  165. };
  166. },
  167. cache: true
  168. },
  169. minimumInputLength:1,
  170. tags:true
  171. });
  172. $("#select_tags").change(function(){
  173. $("#tags").val($("#select_tags").val());
  174. });
  175. /*加载省份城市*/
  176. $("#province").change(function(){
  177. var province_id = $(this).val();
  178. $("#city").load("{{ url('ajax/loadCities') }}/"+province_id);
  179. });
  180. });
  181. </script>
  182. @endsection