@extends('layouts.admin')
@push('css')
    <link href="{{ asset('js/summernote/summernote.css') }}" rel="stylesheet">
@endpush
@section('content')
    <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="panel panel-default">

                <div class="panel-heading">
                    <h1>Terms of service</h1>
                </div>
                <div class="panel-body">
                    <div class="clearfix"></div>

                    <div class="row">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="x_panel">
                                <form method="post" action="{{route('terms.of.service')}}" enctype="multipart/form-data">
                                    @csrf

                                    <input type="hidden" name="id"  value="{{empty($content['id'])?'':$content['id']}}" />
                                    <div class="form-group">
                                        <label>Title</label>

                                        <input type="text" name="title"  value="{{empty($content['title'])?'terms and service':$content['title']}}"  class="form-control" />
                                    </div>
                                    <div class="form-group">
                                        <label>Description</label>

                                        <textarea id="summernote" name="body" > {{empty($content['terms_service'])?'':$content['terms_service']}}</textarea>
                                    </div>

                                    <div class="pull-right">
                                        @if(isShowContent('terms.of.service'))
                                        <button type="submit" class="btn btn-success btn-block">Publish</button>
                                        @endif
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
@push('script')
    <script>
        $(document).ready(function() {
            let selctor=$('#summernote');
            common_helper.init_summernote(selctor);
        })
    </script>
@endpush


