123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- @extends('admin/layout')
- @section('header')
- <link href="{{asset('css/plugins/chosen/chosen.css')}}" rel="stylesheet">
- <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
- <link rel="stylesheet"
- href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/css/bootstrap-select.min.css">
- @endsection
- @section('content')
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-content">
- <form method="get" class="form-horizontal" id="form">
- <div class="form-group">
- <label class="col-sm-2 control-label" for="nickname"><span
- class="red">* </span>问题:</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" id="title" name="title" autocomplete="off"
- value="{{$info->title??''}}">
- </div>
- </div>
- {{-- <div class="form-group">
- <label class="col-sm-2 control-label" for="username_new"><span class="red">* </span>
- 内容:</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" id="content" name="content"
- value="{{$info->content??''}}" autocomplete="off">
- </div>
- </div>--}}
- <div class="form-group">
- <label class="col-sm-2 control-label" for="translate_content">回答:</label>
- <div class="col-sm-8">
- <script id="translate_content" name="content"
- type="text/plain">{!! $info->content??''!!}</script>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-4 col-sm-offset-2">
- <button class="btn btn-primary" type="button" data-id="{{$info->id??0}}"
- id="save">
- 保存
- </button>
- <button class="btn btn-white" type="button" id="cancel">取消</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- @endsection
- @section('footer')
- @include('vendor.ueditor.assets')
- <script src="{{asset('js/plugins/switchery/switchery.js')}}"></script>
- <script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/js/bootstrap-select.min.js"></script>
- <script>
- var ue = UE.getEditor('content');
- ue.ready(function () {
- ue.setHeight(300);
- });
- var ueTranslate = UE.getEditor('translate_content');
- ueTranslate.ready(function () {
- ueTranslate.setHeight(300);
- });
- $(document).on('click', '#cancel', function () {
- tips.closeParentLayer();
- });
- $(document).on('click', '#save', function () {
- var data = tips.getFormValues('#form');
- var id = $(this).data('id');
- var url = '/admin/classroom/questions-and-answers-update/' + id;
- var type = 'get';
- var ajaxConfig = {
- url: url,
- type: type,
- data: data,
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1500}, function () {
- tips.closeParentLayer();
- window.parent.tips.tableRefresh('#table');
- });
- }
- };
- tips.ajax(ajaxConfig);
- });
- </script>
- @endsection
|