@extends('admin.facilities.view')
@section('content-inner')

    <h4 class='my-3'>
        <div>Update Basic</div>
    </h4>

    <form action="/post-to-api"
          method="post" enctype="multipart/form-data"
          class="bg-light rounded border px-3 pt-3 mr-3 mb-3">
        @csrf

        @if (session('message'))
            <div class="alert alert-danger">{{ session('message') }}</div>
        @endif

        <input type="hidden" name="_uid" value="{{ $record->uid }}">
        <input type="hidden" name="_api" value="/api/facility/updateBasic">
        <input type="hidden" name="_success" value="{{route('facilities-view', ['uid' => $record->uid])}}">
        <input type="hidden" name="_return" value="{{route('facilities_SINGLE-ACTION_updateBasic', ['uid' => $record->uid])}}">
        <div class='form-group mb-3'>
<label class='control-label'>Name</label>
<input class='form-control' type='text' name='name' value='{{ old('name') ? old('name') : $record->name }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Address Full</label>
<input class='form-control' type='text' name='addressFull' value='{{ old('addressFull') ? old('addressFull') : $record->address_full }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Address Line 1</label>
<input class='form-control' type='text' name='addressLine1' value='{{ old('addressLine1') ? old('addressLine1') : $record->address_line1 }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Address Line 2</label>
<input class='form-control' type='text' name='addressLine2' value='{{ old('addressLine2') ? old('addressLine2') : $record->address_line2 }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Address City</label>
<input class='form-control' type='text' name='addressCity' value='{{ old('addressCity') ? old('addressCity') : $record->address_city }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Address State</label>
<input class='form-control' type='text' name='addressState' value='{{ old('addressState') ? old('addressState') : $record->address_state }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Address Zip</label>
<input class='form-control' type='text' name='addressZip' value='{{ old('addressZip') ? old('addressZip') : $record->address_zip }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Address Country</label>
<input class='form-control' type='text' name='addressCountry' value='{{ old('addressCountry') ? old('addressCountry') : $record->address_country }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Address Geo Lat</label>
<input class='form-control' type='text' name='addressGeoLat' value='{{ old('addressGeoLat') ? old('addressGeoLat') : $record->address_geo_lat }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Address Geo Long</label>
<input class='form-control' type='text' name='addressGeoLong' value='{{ old('addressGeoLong') ? old('addressGeoLong') : $record->address_geo_long }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Phone</label>
<input class='form-control' type='text' name='phone' value='{{ old('phone') ? old('phone') : $record->phone }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Fax</label>
<input class='form-control' type='text' name='fax' value='{{ old('fax') ? old('fax') : $record->fax }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Hours</label>
<input class='form-control' type='text' name='hours' value='{{ old('hours') ? old('hours') : $record->hours }}' >
</div>
        <div class="form-group mb-3">
            <button class="btn btn-sm btn-primary mr-3 px-5">Submit</button>
            <a href="{{route('facilities-view', ['uid' => $record->uid])}}" class="btn btn-sm btn-default px-5">Cancel</a>
        </div>
    </form>

@endsection
