@extends('admin/layouts/default')
{{-- Page title --}}
@section('title')
Add Journal Policy
@parent
@stop
{{-- page level styles --}}
@section('header_styles')
<link href="{{ asset('assets/vendors/summernote/summernote.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('assets/css/pages/editor.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/vendors/select2/css/select2.min.css') }}" type="text/css" rel="stylesheet">
<link href="{{ asset('assets/vendors/select2/css/select2-bootstrap.css') }}" rel="stylesheet">
<!-- end of page level css-->

@stop
{{-- Page content --}}
@section('content')
<section class="content-header">
    <!--section starts-->
    <h1>Add New Journal Policy</h1>
    <ol class="breadcrumb">
        <li>
            <a href="{{ route('admin.dashboard') }}">
                <i class="livicon" data-name="home" data-size="14" data-loop="true"></i>
                Dashboard
            </a>
        </li>
        <li><a href="{{ URL::to('admin/indexing_agencies') }}">Journal Policy List</a></li>
        <li class="active">
            Add New Journal Policy
        </li>
    </ol>
</section>
@if ($message = Session::get('success'))
<div class="alert alert-success alert-dismissable">
    <p>{{ $message }}</p>
</div>
@endif
@if ($message = Session::get('error'))
<div class="alert alert-danger alert-dismissable">
    <p>{{ $message }}</p>
</div>
@endif
<!--section ends-->
<section class="content paddingleft_right15">
    <!--main content-->
    <div class="row">
        <div class="panel panel-primary ">
            <div class="panel-heading">
                <h3 class="panel-title">
                    Journal Policy Form
                </h3>
            </div>
            <div class="panel-body">
                <div id="banner" class="panel">
                    <div class="panel-body">
                        <form name="myForm" method="post" action="{{ route('journal_policy.store') }}" enctype="multipart/form-data" onsubmit="return validateForm()">
                            <input type="hidden" name="_token" value="<?= csrf_token() ?>">

                            <div class="form-group col-md-12">
                                <label for="e1" class="control-label">Journal: <span class="text-danger">*</span></label>
                                <section class="scroll-fix">
                                    <select id="journal_id" class="form-control select2" name="journal_id" required>
                                        <option selected="true" value="" disabled="disabled" hidden>Select Journal</option>
                                        @foreach ($journal_search as $key => $value)
                                        <option value="{{$key}}">{{$value}}</option>
                                        @endforeach
                                    </select>
                                </section>
                            </div>

                            <div class="form-group col-md-12">
                                <label for="e1" class="control-label">Policy: <span class="text-danger">*</span></label>
                                <div class='box-body box_content'>
                                    <textarea id="summernote" name="policy" required></textarea>
                                </div>
                            </div>

                            <div class="form-group text-center col-md-12">
                                <button class="btn btn-primary text-center" type="submit">Submit</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>
    <!--main content ends-->
</section>
<!-- content -->
@stop

{{-- page level scripts --}}
@section('footer_scripts')
<script src="{{ asset('assets/vendors/bootstrap3-wysihtml5-bower/js/bootstrap3-wysihtml5.all.min.js') }}" type="text/javascript"></script>
<script src="{{ asset('assets/vendors/summernote/summernote.min.js') }}" type="text/javascript"></script>
<script src="{{ asset('assets/js/pages/editor2.js') }}" type="text/javascript"></script>
<script src="{!! asset('assets/vendors/select2/js/select2.js') !!}"></script>
<script>
    $(document).ready(function() {
        $("#journal_id").select2({
            theme: "bootstrap",
            placeholder: "Select Journal",
            width: '100%',
            height: '50px'
        });
    });
</script>
@stop