@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><a href="{!! url('officelocations') !!}">Branches</a></li>
          <li class="active">New Documents</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' => 'officelocations/filestore', 'files' => 'true', 'class' => 'form-horizontal form-label-left']) !!}
                  <input type="hidden" name="branch_id" value="{{ $branch_id }}">
                  <div class="row">
                      <div class="row">
                            <div class="col-md-4">
                              <div class="form-group">            
                                <div class=" {{ $errors->has('how_we_got_client_other') ? 'has-error' : ''}}">
                                  <label class="" for="documentOneName">First Document Name</label>
                                  {!! Form::text('document_one_name', null, ['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('validity_period_one') ? 'has-error' : ''}}">
                                  <label class="" for="validityPeriodOne">Validity Period(Optional)</label>
                                  {!! Form::text('validity_period_one', null, ['class' => 'form-control validityPeriod' , 'id' => 'validityPeriodOne', 'placeholder' => '']) !!}
                                  {!! $errors->first('validity_period_one', '<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', 'placeholder' => 'Select file to upload']) !!}
                                  {!! $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('how_we_got_client_other') ? 'has-error' : ''}}">
                                  <label class="" for="documentOneName">Second 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('validity_period_two') ? 'has-error' : ''}}">
                                  <label class="" for="validityPeriodOne">Validity Period(Optional)</label>
                                  {!! Form::text('validity_period_two', null, ['class' => 'form-control validityPeriod' , 'id' => 'validityPeriodTwo', 'placeholder' => '']) !!}
                                  {!! $errors->first('validity_period_two', '<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('how_we_got_client_other') ? 'has-error' : ''}}">
                                  <label class="" for="documentThreeName">Third 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('validity_period_third') ? 'has-error' : ''}}">
                                  <label class="" for="validityPeriodThird">Validity Period (Optional)</label>
                                  {!! Form::text('validity_period_third', null, ['class' => 'form-control validityPeriod' , 'id' => 'validityPeriodThird', 'placeholder' => '']) !!}
                                  {!! $errors->first('validity_period_third', '<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', 'placeholder' => 'Select file to upload']) !!}
                                  {!! $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();

    $('.validityPeriod').datetimepicker({
        format: 'YYYY-MM-DD'
    });

  });
</script>
@endsection
