create.blade.php 9.0 KB

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