@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('infrastructure/vpn') !!}">VPN List</a></li>
          <li class="active">New VPN Configs</li>
        </ol>
      </div>
    </div>
    <div class="clearfix"></div>
      <div class="row">
        @include('commons.notifications')
        <div class="col-md-12 col-sm-12 col-xs-12">
          <div class="x_panel">
              <div class="x_title">
                New VPN Configs
                <div class="clearfix"></div>
              </div>
                {{-- start of content --}}
                <div class="x_content">
                  <br>
                      {!! Form::open(['url' => 'infrastructure/storevpn', 'class' => 'form-horizontal form-label-left']) !!}
                      <div class="row">
                        <div class="col-md-12">                        
                          <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="remoteClientMno">Remote Client/MNO *</label>
                            <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('remote_client_mno') ? 'has-error' : ''}}">
                              {!! Form::text('remote_client_mno', old('remote_client_mno'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder' => '' , 'id' => 'remoteClientMno']) !!}
                              {!! $errors->first('remote_client_mno', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="vpn_device">VPN Device (Maker/Model)</label>
                            <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('vpn_device') ? 'has-error' : ''}}">
                              {!! Form::text('vpn_device', old('vpn_device'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Remote VPN Device' , 'id' => 'remoteVpnDevice']) !!}
                              {!! $errors->first('vpn_device', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="remotePeerIp">Remote Peer IP *</label>
                            <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('remotePeerIp') ? 'has-error' : ''}}">
                              {!! Form::text('remote_peer_ip', old('remote_peer_ip'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Remote Peer IP' , 'id' => 'remotePeerIp']) !!}
                              {!! $errors->first('remote_peer_ip', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="remoteIps">Remote IPs (ACLs) *</label>
                            <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('remote_ips') ? 'has-error' : ''}}">
                              {!! Form::text('remote_ips', old('remote_ips'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Remote IPs seperated by commas' , 'id' => 'remoteIps']) !!}
                              {!! $errors->first('remote_ips', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="localIps">Local IPs (ACLs) *</label>
                            <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('local_ips') ? 'has-error' : ''}}">
                              {!! Form::text('local_ips', old('local_ips'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter local IPs seperated by commas' , 'id' => 'localIps']) !!}
                              {!! $errors->first('local_ips', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="goLiveDate">Go Live Date </label>
                            <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('go_live_date') ? 'has-error' : ''}}">
                              {!! Form::text('go_live_date', old('go_live_date'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter date' , 'id' => 'goLiveDate']) !!}
                              {!! $errors->first('go_live_date', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                        </div>
                        <div class="clearfix"></div>
                        <div class="ln_solid"></div>
                        <div class="col-md-12"> 
                          <h4 class="text-center"><strong>Phase 1 & 2 Settings</strong></h4>
                          <div class="form-group">
                            <div class="col-md-12 {{ $errors->has('phase_1_and_2_settings') ? 'has-error' : ''}}">
                              <label class="control-label col-md-3 col-sm-3 col-xs-12" for="phase1And2Settings">Phase 1 & 2 Settings </label>
                              {!! Form::file('phase_1_and_2_settings', old('phase_1_and_2_settings'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'phase1And2Settings']) !!}
                              {!! $errors->first('phase_1_and_2_settings', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <div class="col-md-12 {{ $errors->has('original_vpn_form') ? 'has-error' : ''}}">
                              <label class="control-label col-md-3 col-sm-3 col-xs-12" for="originalVpnForm">Original VPN Form </label>
                              {!! Form::file('original_vpn_form', old('original_vpn_form'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'originalVpnForm']) !!}
                              {!! $errors->first('original_vpn_form', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                        </div>                        
                        </div>
                      </div>       
                      <div class="ln_solid"></div>
                      <div class="form-group">
                        <div class="col-md-12">
                          <button type="submit" class="btn btn-success btn-block"><i class="fa fa-save"></i> Save</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
