@extends('layouts.master')
@section('page_title')
    @if(isset($page_title))
        {{ $page_title }}
    @endif
@endsection
@section('content')
  <div class="">
    <div class="page-title">
      <div class="title_left" style="width:800px !important;">
        <ol class="breadcrumb">
          <li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
          <li class="active"><a href="{!! url('generaldocuments') !!}">Documents</a></li>
          <li class="active">New Document</li>
        </ol>
      </div>
    </div>
    <div class="clearfix"></div>
      <div class="row">
        <div class="col-md-8">
          <div class="x_panel">
              <div class="x_title">
                New Document
                @include('commons.notifications')
                <div class="clearfix"></div>
              </div>
              {{-- start of content --}}
              <div class="x_content">
              <br>
                  {!! Form::open(['url' => 'generaldocuments', 'files' => 'true', 'class' => 'form-horizontal form-label-left']) !!}
                  <div class="row">
                      <div class="row">
                            <div class="col-md-4">
                              <div class="form-group">            
                                <div class=" {{ $errors->has('document_one_category') ? 'has-error' : ''}}">
                                  <label class="" for="docCatOne">Document Category</label>
                                  {!! Form::select('document_one_category', $categories, null,  ['class' => 'form-control', 'placeholder'=>'Select Category' , 'id' => 'docCatOne']) !!}
                                  {!! $errors->first('category', '<p class="help-block">:message</p>') !!}
                                </div>
                              </div>
                            </div>
                            <div class="col-md-4">
                              <div class="form-group">            
                                <div class=" {{ $errors->has('how_we_got_client_other') ? 'has-error' : ''}}">
                                  <label class="" for="documentOneName">Document Name</label>
                                  {!! Form::text('document_one_name', '', ['class' => 'form-control' , 'id' => 'documentOneName', 'placeholder' => 'Enter name of document']) !!}
                                  {!! $errors->first('document_one_name', '<p class="help-block">:message</p>') !!}
                                </div>
                              </div>
                            </div>
                            <div class="col-md-4">
                              <div class="form-group">
                                <div class=" {{ $errors->has('document_one') ? 'has-error' : ''}}">
                                  <label class="" for="documentOne">First Document</label>
                                  {!! Form::file('document_one', null, ['class' => 'form-control' , 'id' => 'documentOne']) !!}
                                  {!! $errors->first('document_one', '<p class="help-block">:message</p>') !!}
                                </div>
                              </div>                            
                            </div>
                          </div>
                          <div class="row">
                            <div class="col-md-4">
                              <div class="form-group">            
                                <div class=" {{ $errors->has('document_two_category') ? 'has-error' : ''}}">
                                  <label class="" for="docCatTwo">Document Category</label>
                                  {!! Form::select('document_two_category', $categories, null,  ['class' => 'form-control', 'placeholder'=>'Select Category' , 'id' => 'docCatTwo']) !!}
                                  {!! $errors->first('category', '<p class="help-block">:message</p>') !!}
                                </div>
                              </div>
                            </div>
                            <div class="col-md-4">
                              <div class="form-group">            
                                <div class=" {{ $errors->has('document_two_name') ? 'has-error' : ''}}">
                                  <label class="" for="documentOneName">Document Name</label>
                                  {!! Form::text('document_two_name', null, ['class' => 'form-control' , 'id' => 'documentTwoName', 'placeholder' => 'Enter name of document']) !!}
                                  {!! $errors->first('document_two_name', '<p class="help-block">:message</p>') !!}
                                </div>
                              </div>
                            </div>
                            <div class="col-md-4">
                              <div class="form-group">
                                <div class=" {{ $errors->has('document_two') ? 'has-error' : ''}}">
                                  <label class="" for="documentTwo">Second Document</label>
                                  {!! Form::file('document_two', null, ['class' => 'form-control' , 'id' => 'documentTwo', 'placeholder' => 'Select file to upload']) !!}
                                  {!! $errors->first('document_two', '<p class="help-block">:message</p>') !!}
                                </div>
                              </div>
                            </div>
                          </div>
                          <div class="row">
                            <div class="col-md-4">
                              <div class="form-group">            
                                <div class=" {{ $errors->has('document_three_category') ? 'has-error' : ''}}">
                                  <label class="" for="docCatThree">Document Category</label>
                                  {!! Form::select('document_three_category', $categories, null,  ['class' => 'form-control', 'placeholder'=>'Select Category' , 'id' => 'docCatThree']) !!}
                                  {!! $errors->first('category', '<p class="help-block">:message</p>') !!}
                                </div>
                              </div>
                            </div>
                            <div class="col-md-4">
                              <div class="form-group">            
                                <div class=" {{ $errors->has('document_three_name') ? 'has-error' : ''}}">
                                  <label class="" for="documentThreeName">Document Name</label>
                                  {!! Form::text('document_three_name', null, ['class' => 'form-control' , 'id' => 'documentThreeName', 'placeholder' => 'Enter name of document']) !!}
                                  {!! $errors->first('document_three_name', '<p class="help-block">:message</p>') !!}
                                </div>
                              </div>
                            </div>
                            <div class="col-md-4">
                              <div class="form-group">
                                <div class=" {{ $errors->has('document_three') ? 'has-error' : ''}}">
                                  <label class="" for="documentThree">Third Document</label>
                                  {!! Form::file('document_three', null, ['class' => 'form-control' , 'id' => 'documentThree']) !!}
                                  {!! $errors->first('document_three', '<p class="help-block">:message</p>') !!}
                                </div>
                              </div>
                            </div>
                          </div>
                  
                      <div class="ln_solid"></div>
                      <div class="form-group">
                        <div class="col-md-12 col-sm-12 col-xs-12 btn-block">
                          <button type="submit" class="btn btn-success btn-block"><i class="fa fa-save"></i> Upload</button>
                        </div>
                      </div>
                      {!! Form::close() !!}
                </div>
                {{-- end of x_content --}}
              </div>
              {{-- end of x_panel --}}
            </div>
          </div>
          
        </div>

@endsection

@section('javascript')
<script type="text/javascript">
  $(function(){
    $('select').select2();

  });
</script>
@endsection
