@extends('admin.layout.master')
@section('main-content')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            Edit Media
            <small>All * field required</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="#">Forms</a></li>
            <li class="active">Advanced Elements</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">

        <!-- SELECT2 EXAMPLE -->
        <!-- form start -->
        <form name="editMedia" id="editMedia" method="post" action="/admin/media/{{ $media->id }}">
            @csrf
            @method('PUT')
            <div class="box box-primary">
                <!-- /.box-header -->
                <div class="box-body">
                    <!-- row start -->
                    <div class="row">
                        <div class="col-xs-6">

                            <div class="form-group">
                                <label for="author_name">Title <span class="text text-red">*</span></label>
                                <input type="text" value="{{ $media->title }}" name="author_name" class="form-control" id="author_name">
                            </div>

                            <div class="form-group">
                                <label for="slug">Slug <span class="text text-red">*</span></label>
                                <input type="text" value="{{ $media->slug }}" name="slug" class="form-control" id="slug">
                            </div>
                            <div class="form-group">
                                <label>Media Type <span class="text text-red">*</span></label>
                                <select class="form-control" name="media_type" style="width: 100%;">
                                    <option id="none">-- Select Media Type --</option>
                                    <option id="slider">Slider</option>
                                    <option id="gallery">Gallery</option>
                                </select>
                            </div>
                        </div>

                        <div class="col-xs-6">
                            <div class="form-group">
                                <label for="media_img">Media Image <span class="text text-red">*</span></label>
                                <input type="file" name="media_img" class="form-control" id="media_img">
                            </div>
                            <div class="form-group">
                                <label>Description</label>
                                <textarea class="form-control" name="descp" rows="5">
                                {{ $media->description }}
                                </textarea>
                            </div>
                        </div>
                    </div>

                    <!-- row end -->

                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <button type="submit" class="btn btn-primary">Submit</button>
                    <button type="submit" class="btn btn-danger">Cancel</button>
                </div>
            </div>
            <!-- /.box -->

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

@endsection