advertise_edit.blade.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. @extends('admin/layout')
  2. @section('header')
  3. <link href="{{asset('css/plugins/chosen/chosen.css')}}" rel="stylesheet">
  4. <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
  5. <link rel="stylesheet"
  6. href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/css/bootstrap-select.min.css">
  7. @endsection
  8. @section('content')
  9. <body class="gray-bg">
  10. <div class="wrapper wrapper-content animated fadeInRight">
  11. <div class="row">
  12. <div class="col-sm-12">
  13. <div class="ibox float-e-margins">
  14. <div class="ibox-content">
  15. <form method="get" class="form-horizontal" id="form">
  16. <div class="form-group">
  17. <label class="col-sm-2 control-label" for="advertise_code"><span class="red">* </span>广告代码:</label>
  18. <div class="col-sm-6">
  19. <input type="text" class="form-control" id="advertise_code" name="advertise_code"
  20. value="{{$info->advertise_code??''}}" autocomplete="off">
  21. </div>
  22. </div>
  23. <div class="form-group">
  24. <label class="col-sm-2 control-label" for="name"><span
  25. class="red">* </span>广告位名称 :</label>
  26. <div class="col-sm-6">
  27. <input type="text" class="form-control" id="advertise_name" name="advertise_name"
  28. autocomplete="off" value="{{$info->advertise_name??''}}">
  29. </div>
  30. </div>
  31. <div class="form-group">
  32. <label class="col-sm-2 control-label" for="width"><span
  33. class="red">* </span>宽度:</label>
  34. <div class="col-sm-6">
  35. <input type="text" class="form-control" id="width" name="width"
  36. value="{{$info->width??0}}" autocomplete="off">
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. <label class="col-sm-2 control-label" for="height"><span
  41. class="red">* </span>高度:</label>
  42. <div class="col-sm-6">
  43. <input type="text" class="form-control" id="height" name="height"
  44. value="{{$info->height??0}}" autocomplete="off">
  45. </div>
  46. </div>
  47. <div class="form-group">
  48. <label class="col-sm-2 control-label" for="limit"><span
  49. class="red">* </span>同时显示:</label>
  50. <div class="col-sm-6">
  51. <input type="text" class="form-control my-date deadline"
  52. name="limit" id="limit"
  53. value="{{$info->limit??0}}" autocomplete="off">
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <div class="col-sm-4 col-sm-offset-2">
  58. <button class="btn btn-primary" type="button" data-id="{{$info->id??0}}"
  59. id="save">
  60. 保存
  61. </button>
  62. <button class="btn btn-white" type="button" id="cancel">取消</button>
  63. </div>
  64. </div>
  65. </form>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </body>
  72. @endsection
  73. @section('footer')
  74. <script>
  75. $(document).on('click', '#cancel', function () {
  76. tips.closeParentLayer();
  77. });
  78. $(document).on('click', '#save', function () {
  79. var data = tips.getFormValues('#form');
  80. var id = $(this).data('id');
  81. var ajaxConfig = {
  82. url: '/admin/advertise/advertise-edit/' + id + '/{{$siteId}}',
  83. type: 'post',
  84. data: data,
  85. success: function (result) {
  86. layer.msg(result.message, {icon: 6, time: 1500}, function () {
  87. tips.closeParentLayer();
  88. window.parent.tips.tableRefresh('#table');
  89. });
  90. }
  91. };
  92. tips.ajax(ajaxConfig);
  93. });
  94. </script>
  95. @endsection