@extends('admin/layouts/default')

{{-- Page title --}}
@section('title')
Update IPs For WebServices
@parent
@stop

{{-- page level styles --}}
@section('header_styles')
     @include('admin.layouts.css')

@stop

{{-- Page content --}}
@section('content')

<section class="content-header">
                <!--section starts-->
               <h1>Update IPs For WebServices</h1>               
                <ol class="breadcrumb">
                    <li>
                        <a href="{{ route('admin.dashboard') }}">
                            <i class="livicon" data-name="home" data-size="14" data-loop="true"></i>
                            Dashboard
                        </a>
                    </li>
                    <li ><a href="{{ URL::to('admin/ipaccess') }}">IPAccess List</a></li>
                    <li class="active">Update IPAccess</li>
                </ol>
            </section>
            <!--section ends-->
<section class="content paddingleft_right15">
    <!--main content-->
    <div class="row">
        <div class="panel panel-primary ">
            <div class="panel-heading">
                <h3 class="panel-title">
                    <i class="livicon" data-name="gear" data-size="16" data-loop="true" data-c="#fff" data-hc="white"></i>
                    IPAccess
                </h3>
                <span class="pull-right clickable">
                    <i class="glyphicon glyphicon-chevron-up"></i>
                </span>
            </div>
            <div class="panel-body">               
                  <form name="first" method="post" action="{{ route('ipaccess.update',$ipaccess->id) }}" enctype="multipart/form-data"> @method('PUT')  
                    <input type="hidden" name="id" value="{{$ipaccess->id}}">               
                <input type="hidden" name="_token" value="<?=csrf_token()?>">
             @if ($errors->any())
                <div class="row">
                    <div class="col-md-9 col-lg-offset-3 col-md-offset-3 pd-r lert alert-danger">
                        <strong>Whoops!</strong> There were some problems with your input.<br>
                        <ul>
                            @foreach ($errors->all() as $error)
                                <li>{{ $error }}</li>
                            @endforeach
                        </ul>
                    </div>
                </div>
                @endif                    
                <div class="row acc-wizard">
                    <div class="col-md-3 pd-2">
                        <p class="mar-2">
                            Follow the steps below to add new ipaccess.
                        </p>
                        <ol class="acc-wizard-sidebar">
                            <li class="acc-wizard-todo">
                                <a href="#ipaccess">IPAccess</a>
                            </li>                                                      
                       </ol>
                    </div>
                    <div class="col-md-9 pd-r">
                        <div id="accordion-demo" class="panel-group">
                            <!-- /.panel.panel-default -->
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h4 class="panel-title">
                                        <a href="#ipaccess" data-parent="#accordion-demo" data-toggle="collapse">IPAccess</a>
                                    </h4>
                                </div>
                                <div id="ipaccess" class="panel-collapse collapse">
                                    <div class="panel-body">
                                        <div class="form-group  {{ $errors->first('ip_address', 'has-error') }}">
                                            <label for="ip_address" class="control-label">IP Address</label>
                                            <input type="text" name="ip_address" id="ip_address" class="form-control input-md" placeholder="IP Address" value="{{ old('ip_address',isset($ipaccess->ip_address) ? $ipaccess->ip_address : '') }}">                            
                                        </div>
                                        <div class="form-group {{ $errors->first('auth_type', 'has-error') }}">
                                            <label for="auth_type" class="control-label">Authentication Type</label>
                                            <select name="auth_type"  class="form-select required form-control" id="auth_type">
                                                <option title="Web Service" value="Web Service" @if($ipaccess->auth_type=='Web Service') selected @endif>Web Service</option>
                                                <option title="System User" value="System User"  @if($ipaccess->auth_type=='System User') selected @endif>System User</option>
                                            </select>
                                        </div>
                                        <div class="form-group {{ $errors->first('domain_name', 'has-error') }}">
                                            <label for="domain_name" class="control-label">Domain Name:</label>
                                            <input type="text" name="domain_name" id="domain_name" class="form-control input-md" placeholder="Domain Name" 
                                                value="{{ old('domain_name',isset($ipaccess->domain_name) ? $ipaccess->domain_name : '') }}">
                                            <div>
                                                <span class="text-danger">{{ $errors->first('domain_name') }}</span>
                                            </div>
                                        </div>
                                        <div class="form-group {{ $errors->first('description', 'has-error') }}">
                                            <label for="description" class="control-label">Description:</label>
                                           <textarea class="form-control resize_vertical" id="description" name="description" placeholder="description..." rows="5">{{ old("description",isset($ipaccess->description) ? $ipaccess->description : '') }}</textarea>
                                            <div>
                                                <span class="text-danger">{{ $errors->first('description') }}</span>
                                            </div>
                                        </div>                                        
                                                
                                    </div>
            <!--/.panel-body --> </div>

        <!-- /#adjusthtml --> </div>
                            
                            
                </div>
                <button class="btn btn-primary" type="submit">Save</button>
            </form>
            </div>
        </div>

    </div>
    <!--main content ends--> </section>
            <!-- content --> 
    @stop

{{-- page level scripts --}}
@section('footer_scripts')

    @include('admin.layouts.js')

@stop
