@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>
            Create Book
            <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="addBook" id="addBook" method="post" action="/admin/book">
            @csrf
            <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 {{ $errors->has('title') ? 'has-error' : NULL }}">
                                <label for="title">Title <span class="text text-red">*</span></label>
                                <input type="text" name="title" value="{{ old('title')}}" class="form-control" id="title" placeholder="Fullname">
                                <span class="text-danger">{{ $errors->first('title') }}</span>

                            </div>

                            <div class="form-group {{ $errors->has('slug') ? 'has-error' : NULL }}">
                                <label for="slug">Slug <span class="text text-red">*</span></label>
                                <input type="text" name="slug" value="{{ old('slug')}}" class="form-control" id="slug" placeholder="Slug">
                                <span class="text-danger">{{ $errors->first('slug') }}</span>

                            </div>
                            <div class="form-group">
                                <label>Category <span class="text text-red">*</span></label>
                                <select class="form-control" name="category_id" style="width: 100%;">
                                    <option id="0">-- Select Category --</option>
                                    <option id="1">Comics Books</option>
                                    <option id="2">Novel Books</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Author <span class="text text-red">*</span></label>
                                <select class="form-control" name="author_id" style="width: 100%;">
                                    <option id="0">-- Select Author --</option>
                                    <option id="1">Muhammad Imran</option>
                                    <option id="2">Muhammad Mustafa</option>
                                </select>
                            </div>

                            <div class="form-group {{ $errors->has('availability') ? 'has-error' : NULL }}">
                                <label for="availability">Availability <span class="text text-red">*</span></label>
                                <input type="text" name="availability" value="{{ old('availability')}}" class="form-control" id="availability" placeholder="Availability">
                                <span class="text-danger">{{ $errors->first('availability') }}</span>

                            </div>
                            <div class="form-group {{ $errors->has('price') ? 'has-error' : NULL }}">
                                <label for="price">Price: <span class="text text-red">*</span></label>
                                <input type="text" name="price" value="{{ old('price')}}" class="form-control" id="price" placeholder="Price">
                                <span class="text-danger">{{ $errors->first('price') }}</span>

                            </div>

                            <div class="form-group">
                                <label for="publisher">Publisher</label>
                                <input type="text" name="publisher" class="form-control" id="publisher" placeholder="Publisher">
                            </div>
                            <div class="form-group">
                                <label for="country">Country of Publisher</label>
                                <input type="text" name="country" class="form-control" id="country" placeholder="Country of Publisher">
                            </div>

                            <div class="form-group">
                                <label for="rating">Rating</label>
                                <input type="text" name="rating" class="form-control" id="rating" placeholder="ISBN">
                            </div>

                            <div class="form-group">
                                <label for="isbn10">ISBN-10</label>
                                <input type="text" name="isbn10" class="form-control" id="isbn10" placeholder="ISBN-10">
                            </div>
                        </div>

                        <div class="col-xs-6">
                            <div class="form-group">
                                <label for="book_img">Book Image</label>
                                <input type="file" name="book_img" class="form-control" id="book_img" placeholder="Book Image">
                            </div>
                            <div class="form-group">
                                <label for="book_up">Book Upload</label>
                                <input type="file" name="book_up" class="form-control" id="book_up" placeholder="Book Upload">
                            </div>
                            <div class="form-group">
                                <label for="aud">Audience</label>
                                <input type="text" name="aud" class="form-control" id="aud" placeholder="Audience">
                            </div>

                            <div class="form-group">
                                <label for="format">Format</label>
                                <input type="text" name="format" class="form-control" id="format" placeholder="Format">
                            </div>

                            <div class="form-group">
                                <label for="lang">Language</label>
                                <input type="text" name="lang" class="form-control" id="lang" placeholder="Language">
                            </div>

                            <div class="form-group {{ $errors->has('description') ? 'has-error' : NULL }}">
                                <label for="description">Description <span class="text text-red">*</span></label>
                                <textarea class="form-control" name="description" rows="5" id="description" placeholder="Description">
                                {{ old('description') }}
                                </textarea>
                                <span class="text-danger">{{ $errors->first('description') }}</span>
                            </div>
                            <div class="form-group">
                                <label for="youtube_id">Total Pages</label>
                                <input type="text" name="pages" class="form-control" id="youtube_id" placeholder="Total Pages">
                            </div>
                            <div class="form-group">
                                <label for="youtube_id">Edition Number</label>
                                <input type="text" name="edition" class="form-control" id="youtube_id" placeholder="Edition Number">
                            </div>

                            <div class="form-group">
                                <label>Recomended</label>
                                <select class="form-control" style="width: 100%;">
                                    <option id="none">-- Select Recomended --</option>
                                    <option id="yes">Recomended</option>
                                    <option id="no">Not Recomended</option>
                                </select>
                            </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>
        <!-- form end -->

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