<!DOCTYPE html>
<html>

@include('includes.head')


<body class="hold-transition skin-blue fixed sidebar-mini">
    <!-- Site wrapper -->
    <div class="wrapper">

        @include('includes.header')
        <!-- =============================================== -->

        <!-- Left side column. contains the sidebar -->
        @include('includes.side-nav')

        <!-- =============================================== -->

        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>
                    Services
                    <small>Manage Services</small>
                </h1>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                    <li><a href="#"> Services</a></li>
                    <li class="active">Services</li>
                </ol>
            </section>

            <!-- Main content -->
            <section class="content">
                @include('includes.messages')
                <!-- Default box -->
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title">Services</h3>


                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="box-body">
                                <form action="{{ route('services.update',$courseInfo->id) }}" enctype="multipart/form-data" method="POST">
                                    @csrf
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <label for="">Name*</label>
                                            <input type="text" name="name" class="form-control" required
                                                value="{{$courseInfo->name ??""}}">
                                        </div>
                                        <div class="form-group col-md-12">
                                            <label for="">Description*</label>
                                            <textarea class="form-control" maxlength="255" required placeholder="Description (Maximum 255 Words)" name="description">{{ $courseInfo->description ??""  }}</textarea>
                                        </div>




                                        <div class="form-group col-md-6">
                                            <label for=""> Image*</label>
                                            <input type="file" name="img" class="form-control"
                                                value="{{$courseInfo->img ??""}}">
                                                <img src="{{$courseInfo->img ??""}}" style="width:100px;">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for=""> Icon*</label>
                                            <input type="file" name="icon" class="form-control"
                                                value="{{$courseInfo->icon ??""}}">
                                                <img src="{{$courseInfo->icon ??""}}" style="width:100px;">
                                        </div>

                                        <div class="form-group col-md-12">
                                            <label for="">Content</label>
                                            <textarea class="form-control textarea" id="editor1"  name="content"><?php echo $courseInfo->content ??"" ?></textarea>
                                        </div>






                                        <div class="form-group col-md-12">
                                            <button type="submit" class="btn btn-info" value="Submit">Submit</button>
                                        </div>
                                    </div>
                                </form>
                            </div>



                        </div>
                        <!-- /.box-body -->

                    </div>

                </div>

        </div>

        <!-- /.box -->

        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->

    @include('includes.footer')

    </div>
    <!-- ./wrapper -->

    @include('includes.scripts')
    <script>
        $(function() {
            CKEDITOR.replace('editor7')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor8')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor5')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor6')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor9')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor10')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor11')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor12')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor13')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor14')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor15')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor16')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor17')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor18')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor19')
        })
    </script>
    <script>
        $(function() {
            CKEDITOR.replace('editor20')
        })
    </script>
    <script>
        function initCKEditor(elementId) {
            CKEDITOR.replace(elementId);
        }

        $(function() {
            initCKEditor('editor1');
            initCKEditor('editor2');
            initCKEditor('editor3');
            initCKEditor('editor4');
            initCKEditor('editor5');
            initCKEditor('editor6');
            initCKEditor('editor7');
            initCKEditor('editor8');

            // Other initialization code...
        });
    </script>

</body>

</html>
