@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 Author
            <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="addAuthor" id="addAuthor" method="post" enctype="multipart/form-data" action="/admin/author">
            @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">Fullname <span class="text text-red">*</span></label>
                                <input type="text" class="form-control" value="{{ old('title')}}" name="title" 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" class="form-control" value="{{ old('slug')}}" name="slug" id="slug" placeholder="Slug">
                                <span class="text-danger">{{ $errors->first('slug') }}</span>

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

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

                            </div>

                            <div class="form-group">
                                <label for="email">Email <span class="text text-red">*</span></label>
                                <input type="email" name="email" class="form-control" id="email" placeholder="Email">
                            </div>

                            <div class="form-group {{ $errors->has('country') ? 'has-error' : NULL }}">
                                <label>Country <span class="text text-red">*</span></label>
                                <select class="form-control select2" name="country" style="width: 100%;">
                                    <option value="none">Select Country</option>
                                    @foreach($countries as $country)
                                    <option value="{{ $country->country_id }}">{{ $country->name }}</option>
                                    @endforeach
                                </select>
                                <span class="text-danger">{{ $errors->first('country') }}</span>

                            </div>

                            <div class="form-group">
                                <label for="phone">Phone</label>
                                <input type="text" class="form-control" id="phone" placeholder="Phone">
                            </div>

                            <div class="form-group">
                                <label>Address</label>
                                <textarea class="form-control" name="descp" rows="5" placeholder="Enter ..."></textarea>
                            </div>
                        </div>

                        <div class="col-xs-6">
                            <div class="form-group {{ $errors->has('author_img') ? 'has-error' : NULL }}">
                                <label for="author_img">Author Image <span class="text text-red">*</span></label>
                                <input type="file" class="form-control" name="author_img" id="author_img" placeholder="Author Image">
                                <span class="text-danger">{{ $errors->first('author_img') }}</span>

                            </div>
                            <div class="form-group">
                                <label for="facebook_id">Facebook ID</label>
                                <input type="text" class="form-control" name="facebook_id" id="facebook_id" placeholder="Facebook ID">
                            </div>

                            <div class="form-group">
                                <label for="twitter_id">Twitter ID</label>
                                <input type="text" class="form-control" name="twitter_id" id="twitter_id" placeholder="Twitter ID">
                            </div>

                            <div class="form-group">
                                <label for="youtube_id">YouTube ID</label>
                                <input type="text" class="form-control" name="youtube_id" id="youtube_id" placeholder="YouTube ID">
                            </div>
                            <div class="form-group">
                                <label for="pinterest_id">Pinterest ID</label>
                                <input type="text" class="form-control" name="pinterest_id" id="pinterest_id" placeholder="Pinterest ID">
                            </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 -->

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

@endsection