case_save.blade.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. @extends('admin/layout')
  2. @section('header')
  3. <link href="{{asset('css/plugins/chosen/chosen.css?v=1')}}" rel="stylesheet">
  4. <link href="{{asset('css/plugins/switchery/switchery.css?v=1')}}" rel="stylesheet">
  5. <link href="{{asset('js/plugins/bootstrap-select-1.13.5/css/bootstrap-select.min.css')}}" rel="stylesheet">
  6. @endsection
  7. @section('content')
  8. <body class="gray-bg">
  9. <div class="wrapper wrapper-content animated fadeInRight">
  10. <div class="row">
  11. <div class="col-sm-12">
  12. <div class="ibox float-e-margins">
  13. <div class="ibox-content">
  14. <form method="get" class="form-horizontal" id="form">
  15. <div class="form-group">
  16. <label class="col-sm-2 control-label" for="type">外链类型:</label>
  17. <div class="col-sm-8 ">
  18. <select class=" form-control"
  19. id="type" name="type" data-live-search="true"
  20. title="请选择外链类型" autocomplete="off">
  21. @foreach ($typeList as $key=>$item)
  22. <option value="{{$key}}"
  23. @if(($data->type??null)==$key) selected @endif>{{$item}}</option>
  24. @endforeach
  25. </select>
  26. </div>
  27. </div>
  28. <div class="form-group">
  29. <label class="col-sm-2 control-label" for="url">平台链接:</label>
  30. <div class="col-sm-8">
  31. <input type="text" class="form-control" id="url" name="url"
  32. value="{{$data->url??''}}">
  33. </div>
  34. </div>
  35. <div class="form-group">
  36. <label class="col-sm-2 control-label" for="username_history">用户名:</label>
  37. <div class="col-sm-8">
  38. <input type="text" class="form-control" id="username_history" name="username_history"
  39. value="{{$data->username_history??''}}">
  40. </div>
  41. </div>
  42. <div class="form-group">
  43. <label class="col-sm-2 control-label" for="email_history">邮箱:</label>
  44. <div class="col-sm-8">
  45. <input type="text" class="form-control" id="email_history" name="email_history"
  46. value="{{$data->email_history??''}}">
  47. </div>
  48. </div>
  49. <div class="form-group">
  50. <label class="col-sm-2 control-label" for="url">密码:</label>
  51. <div class="col-sm-8">
  52. <input type="text" class="form-control" id="password_history" name="password_history"
  53. value="{{$data->password_history??''}}">
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label class="col-sm-2 control-label" for="url_history">profile演示地址:</label>
  58. <div class="col-sm-8">
  59. <input type="text" class="form-control" id="url_history" name="url_history"
  60. value="{{$data->url_history??''}}">
  61. </div>
  62. </div>
  63. <div class="hr-line-dashed"></div>
  64. <div class="form-group">
  65. <div class="col-sm-4 col-sm-offset-2">
  66. <button class="btn btn-primary" type="button"
  67. onclick="units.save({{$data->id??0}})">
  68. 保存
  69. </button>
  70. <button class="btn btn-white closeLayer" type="button">取消</button>
  71. </div>
  72. </div>
  73. </form>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </body>
  80. @endsection
  81. @section('footer')
  82. <script src="{{asset('js/plugins/switchery/switchery.js?v=1')}}"></script>
  83. <script src="{{asset('js/plugins/bootstrap-select-1.13.9/dist/js/bootstrap-select.min.js')}}"></script>
  84. <script>
  85. var units = {
  86. save: function (id) {
  87. var url = '/admin/link/case/' + id + '/save';
  88. var data = tips.getFormValues('#form');
  89. // if ($("#business_ids").val()) {
  90. // data.business_ids = $("#business_ids").val().toLocaleString();
  91. // }
  92. // if ($("#cost").val()) {
  93. // data.cost = $("#cost").val().toLocaleString();
  94. // }
  95. var ajaxConfig = {
  96. url: url,
  97. type: 'put',
  98. data: data,
  99. success: function (result) {
  100. layer.msg(result.message, {icon: 6, time: 1000}, function () {
  101. tips.closeParentLayer();
  102. window.parent.tips.tableRefresh('#table');
  103. });
  104. }
  105. };
  106. tips.ajax(ajaxConfig);
  107. }
  108. };
  109. </script>
  110. @endsection