@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_peer_ip', 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="remotePeerIp">Remote Peer IP *</label>
                            <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('server_number') ? '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('friendly_name') ? '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-6"> 
                          <h4 class="text-center"><strong>Phase 1 Settings</strong></h4>
                          <!-- <p class="text-center">Enter Phase 1 Settings</p> -->

                          <div class="form-group">
                            <label class="control-label col-md-5" for="keyExchangeVersion">Key Exchange Version (IKE) </label>
                            <div class="col-md-6 {{ $errors->has('key_exchange_version') ? 'has-error' : ''}}">
                              {!! Form::text('key_exchange_version', old('key_exchange_version'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'keyExchangeVersion']) !!}
                              {!! $errors->first('key_exchange_version', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-5" for="encryptionType">Encyption Type (Proposal) </label>
                            <div class="col-md-6 {{ $errors->has('encryptionType') ? 'has-error' : ''}}">
                              {!! Form::text('encryptionType', old('encryptionType'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'encryptionType']) !!}
                              {!! $errors->first('encryptionType', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-5" for="negotiationMode">Negotiation Mode</label>
                            <div class="col-md-6 {{ $errors->has('negotiation_mode') ? 'has-error' : ''}}">
                              {!! Form::text('main_negotiation_modeuse', old('negotiation_mode'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'negotiationMode']) !!}
                              {!! $errors->first('negotiation_mode', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-5" for="dhGroup">Diffie-Hellman Group- IKE </label>
                            <div class="col-md-6 {{ $errors->has('dhgroup') ? 'has-error' : ''}}">
                              {!! Form::text('dhgroup', old('dhgroup'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'dhGroup']) !!}
                              {!! $errors->first('dhgroup', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-5" for="remarks">Encryption Algorithm </label>
                            <div class="col-md-6 {{ $errors->has('remarks') ? 'has-error' : ''}}">
                              {!! Form::text('encryption_algorithm', old('encryption_algorithm'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'encryption_algorithm']) !!}
                              {!! $errors->first('encryption_algorithm', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-5" for="hashingAlgorithm">Hashing Algorithm </label>
                            <div class="col-md-6{{ $errors->has('hashing_algorithm') ? 'has-error' : ''}}">
                              {!! Form::text('remarks', old('hashing_algorithm'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'hashingAlgorithm']) !!}
                              {!! $errors->first('hashing_algorithm', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-5" for="remarks">Renegotiate IKE SA every </label>
                            <div class="col-md-6 {{ $errors->has('renegotiate_ike_sa') ? 'has-error' : ''}}">
                              {!! Form::text('remarks', old('renegotiate_ike_sa'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'renegotiateIkeSa']) !!}
                              {!! $errors->first('renegotiate_ike_sa', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                        </div>
                        <div class="col-md-6"> 
                          <h4 class="text-center"><strong>Phase 2 Settings</strong></h4>
                          <!-- <p class="text-center">Enter Phase 2 Settings</p> -->

                          <div class="form-group">
                            <label class="control-label col-md-5" for="ipSec">IPSec </label>
                            <div class="col-md-6 {{ $errors->has('ipsec') ? 'has-error' : ''}}">
                              {!! Form::text('ipsec', old('ipsec'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'ipSec']) !!}
                              {!! $errors->first('ipsec', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-5" for="encryptionAlgIpsec">Encryption Algorithm IPSec </label>
                            <div class="col-md-6 {{ $errors->has('encryption_alg_ipsec') ? 'has-error' : ''}}">
                              {!! Form::text('encryption_alg_ipsec', old('encryption_alg_ipsec'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'encryptionAlgIpsec']) !!}
                              {!! $errors->first('encryption_alg_ipsec', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-5" for="hashingAlgIpsec">Hashing Algorithm IPSec</label>
                            <div class="col-md-6 {{ $errors->has('hashing_alg_ipsec') ? 'has-error' : ''}}">
                              {!! Form::text('hashing_alg_ipsec', old('hashing_alg_ipsec'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'hashingAlgIpsec']) !!}
                              {!! $errors->first('hashing_alg_ipsec', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-5" for="renegotiateIpsecSa">Renegotiate IPSec SA every</label>
                            <div class="col-md-6 {{ $errors->has('renegotiate_ipsec_sa') ? 'has-error' : ''}}">
                              {!! Form::text('renegotiate_ipsec_sa', old('renegotiate_ipsec_sa'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'' , 'id' => 'renegotiateIpsecSa']) !!}
                              {!! $errors->first('renegotiate_ipsec_sa', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-5" for="perfectForwardSecrecy">Perfect forward secrecy (pfs) </label>
                            <div class="col-md-6 col-sm-8 {{ $errors->has('perfect_forward_secrecy') ? 'has-error' : ''}}">
                              {!! Form::text('perfect_forward_secrecy', old('perfect_forward_secrecy'), ['class' => 'form-control col-md-7', 'placeholder'=>'' , 'id' => 'perfectForwardSecrecy']) !!}
                              {!! $errors->first('perfect_forward_secrecy', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-5" for="encryptionDomainRemote">Encryption Domain (Remote) </label>
                            <div class="col-md-6 {{ $errors->has('encryption_domain_remote') ? 'has-error' : ''}}">
                              {!! Form::text('encryption_domain', old('encryption_domain_remote'), ['class' => 'form-control col-md-7', 'placeholder'=>'' , 'id' => 'encryptionDomainRemote']) !!}
                              {!! $errors->first('encryption_domain_remote', '<p class="help-block">:message</p>') !!}
                            </div>
                          </div>
                          <div class="form-group">
                            <label class="control-label col-md-5" for="encryptionDomainLocal">Encryption Domain (Local) </label>
                            <div class="col-md-6 {{ $errors->has('encryption_domain_local') ? 'has-error' : ''}}">
                              {!! Form::text('encryption_domain', old('encryption_domain_local'), ['class' => 'form-control col-md-7', 'placeholder'=>'' , 'id' => 'encryptionDomainLocal']) !!}
                              {!! $errors->first('encryption_domain_local', '<p class="help-block">:message</p>') !!}
                            </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
