edit.blade.php 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. @extends('admin/public/layout')
  2. @section('title')编辑友情链接@endsection
  3. @section('content')
  4. <section class="content-header">
  5. <h1>
  6. 编辑友情链接
  7. </h1>
  8. </section>
  9. <section class="content">
  10. <div class="row">
  11. <div class="col-xs-12">
  12. <div class="box box-primary">
  13. <form role="form" name="editForm" method="POST" action="{{ route('admin.friendshipLink.update',['id'=>$link->id]) }}">
  14. <input name="_method" type="hidden" value="PUT">
  15. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  16. <div class="box-body">
  17. <div class="form-group @if($errors->has('name')) has-error @endif">
  18. <label>链接名称</label>
  19. <input type="text" name="name" class="form-control " placeholder="友情链接名称" value="{{ old('name',$link->name) }}">
  20. @if($errors->has('name')) <p class="help-block">{{ $errors->first('name') }}</p> @endif
  21. </div>
  22. <div class="form-group @if($errors->has('slogan')) has-error @endif">
  23. <label>链接口号</label>
  24. <input type="text" name="slogan" class="form-control " placeholder="网站口号,slogan" value="{{ old('slogan',$link->slogan) }}">
  25. @if($errors->has('slogan')) <p class="help-block">{{ $errors->first('slogan') }}</p> @endif
  26. </div>
  27. <div class="form-group @if($errors->has('url')) has-error @endif">
  28. <label>链接地址</label>
  29. <input type="text" name="url" class="form-control " placeholder="网站地址" value="{{ old('url',$link->url) }}">
  30. @if($errors->has('url')) <p class="help-block">{{ $errors->first('url') }}</p> @endif
  31. </div>
  32. <div class="form-group @if($errors->has('sort')) has-error @endif">
  33. <label>显示顺序</label>
  34. <input type="text" name="sort" class="form-control " placeholder="显示顺序" value="{{ old('sort',$link->sort) }}">
  35. @if($errors->has('sort')) <p class="help-block">{{ $errors->first('sort') }}</p> @endif
  36. </div>
  37. <div class="form-group">
  38. <label>状态</label>
  39. <span class="text-muted">(禁用后前台不会显示)</span>
  40. <div class="radio">
  41. <label>
  42. <input type="radio" name="status" value="1" @if($link->status === 1) checked @endif/> 启用
  43. </label>&nbsp;&nbsp;
  44. <label>
  45. <input type="radio" name="status" value="0" @if($link->status === 0) checked @endif/> 禁用
  46. </label>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="box-footer">
  51. <button type="submit" class="btn btn-primary">保存</button>
  52. <button type="reset" class="btn btn-success">重置</button>
  53. </div>
  54. </form>
  55. </div>
  56. </div>
  57. </div>
  58. </section>
  59. @endsection
  60. @section('script')
  61. <script type="text/javascript">
  62. set_active_menu('operations',"{{ route('admin.friendshipLink.index') }}");
  63. </script>
  64. @endsection