@extends('admin/layouts/default')
{{-- Page title --}}
@section('title')
Article Rental Order
@parent
@stop
{{-- page level styles --}}
@section('header_styles')
<!--page level css -->
<link href="{{ asset('assets/css/pages/tables.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">
<script type="text/javascript">
    var rental=true;
</script>
<!--end of page level css-->
@stop
{{-- Page content --}}
@section('content')
<section class="content-header">
    <!--section starts-->
    <h1>Add Article Rental Order</h1>
    <ol class="breadcrumb">
        <li>
            <a href="{{ route('admin.dashboard') }}">
            <i class="livicon" data-name="home" data-size="18" data-loop="true"></i>
            Dashboard
            </a>
        </li>
        <li class="active">Add Article Rental Order</li>
    </ol>
</section>
<!--section ends-->
<section class="content">
    <div class="row">
        <div class="col-md-12">

            @if ($message = Session::get('error'))
                <div class="alert alert-danger alert-dismissable">
                    <p>{{ $message }}</p>
                </div>
            @endif
            <!-- BEGIN SAMPLE TABLE PORTLET-->
        <form method="POST" action="{{ url('admin/web_form_report/rentalorder') }}">
            <input type="hidden" name="_token" value="{{csrf_token()}}">
            <div class="portlet box primary">
                <div class="portlet-title">
                    <div class="caption">
                        <i class="livicon" data-name="responsive" data-size="16" data-loop="true" data-c="#fff" data-hc="white"></i>
                        Add Content Detail
                    </div>
                </div>
                <div class="portlet-body table-responsive">
                    <div class="form-group col-md-6">
                    @include('search.journal_search')
                    </div>
                    <div class="form-group col-md-3">
                    @include('search.volume_search')
                    </div>
                    <div class="form-group col-md-3">
                    @include('search.issue_search')
                    </div>
                    <div class="form-group col-md-12">
                    @include('search.article_search')
                    </div>
                </div>
            </div>

            <div class="portlet box primary">
                <div class="portlet-title">
                    <div class="caption">
                        <i class="livicon" data-name="responsive" data-size="16" data-loop="true" data-c="#fff" data-hc="white"></i>
                        Add User Detail
                    </div>
                </div>
                <div class="portlet-body table-responsive">
                    <div class="form-group col-md-6">
                        <label class="control-label">Display Name: <span class="text-danger">*</span></label>
                    <input type="text" maxlength="50" name="display_name" size="60" class="form-control" placeholder="Display Name" required="required">
                    </div>
                    
                    <div class="form-group col-md-6">
                        <label class="control-label">Email: <span class="text-danger">*</span></label>
                        <input type="email" maxlength="50" name="email" id="" size="60" class="form-control" placeholder="Email" required="required">
                    </div>
                    
                    <div class="form-group col-md-6">
                        <label class="control-label">Country: <span class="text-danger">*</span></label>
                     <select class="form-control select2" id="country" name="country" required = 'required'>
                        <option value="">Country</option>
                     @foreach ($country as $countries)
                        <option value="{{$countries->iso3}}"> {{$countries->printable_name}}</option>
                    @endforeach
                    </select>
                    </div>

                    <div class="form-group col-md-6">
                        <label class="control-label">Rental Package: <span class="text-danger">*</span></label>
                         <select class="form-control select2" id="rental" name="rental" required = 'required'>
                            <option selected="true" value="" disabled="disabled" hidden>Select</option>
                        </select>
                    </div>
                <div class="form-group col-md-12">
                    <button type="submit" class="btn btn-primary" name="submit" value ="true">Submit</button>
                    <a href="{{ URL::to('admin/web_form_report/rentalorder') }}"  id="btn_reset" class="btn btn-default">Reset</a>
                </div>    
                </div>
            </div>

            <!-- END SAMPLE TABLE PORTLET-->
            </form>
        </div>
    </div>
</section>
@stop

{{-- page level scripts --}}
@section('footer_scripts')
<script src="{!! asset('assets/vendors/select2/js/select2.js') !!}"></script>    
<script src="{!! asset('js/filter.js') !!}"></script>
<script>

$(document).ready(function(){
    
    // $('#journal_id').removeAttr('required');
    // $('#volume_id').removeAttr('required');
    // $('#issue_id').removeAttr('required');

    $("#journal_id").select2({
        theme:"bootstrap",
        placeholder:"Select Journal",
        width: '100%',
        height: '50px'
    });
    $("#volume_id").select2({
        theme:"bootstrap",
        placeholder:"Select Volume",
        width: '100%',
        height: '50px'
    });         
    $("#issue_id").select2({
        theme:"bootstrap",
        placeholder:"Select Issue",
        width: '100%',
        height: '50px'
    });     
    $("#article_id").select2({
        theme:"bootstrap",
        placeholder:"Select Article",
        width: '100%',
        height: '50px'
    });     
    $("#country").select2({
        theme:"bootstrap",
        placeholder:"Select Country",
        width: '100%',
        height: '50px'
    });     
    $("#rental").select2({
        theme:"bootstrap",
        placeholder:"Select",
        width: '100%',
        height: '50px'
    });     
});    
</script>
@stop