@extends('pro.clients.view')
@section('content-inner')

    <div class="form-contents"><div class="failed-form-contents">

    <h4 class="d-flex m-0 p-3 stag-heading stag-heading-modal">
        <div>Edit Address</div>
        <div class="ml-auto">
            <a class="text-secondary" href="#" up-close>
                <i class="fa fa-times"></i>
            </a>
        </div>
    </h4>

    <form action="/post-to-api"
          up-target="#main-content" up-history="false" up-fail-target=".failed-form-contents" up-reveal="false"
          method="post" enctype="multipart/form-data"
          class="border-top px-3 pt-3 pb-1 custom-submit">
        @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/client/editAddress">
        <input type="hidden" name="_success" value="{{route('clients-view', ['uid' => $record->uid])}}">
        <input type="hidden" name="_return" value="{{route('clients_SINGLE-ACTION_editAddress', ['uid' => $record->uid])}}">
        <div class='form-group mb-3'>
<label class='control-label'>Is Same Address For Home And Mailing *</label>
<select class='form-control' name='isSameAddressForHomeAndMailing' value='{{ old('isSameAddressForHomeAndMailing') ? old('isSameAddressForHomeAndMailing') : $record->is_same_address_for_home_and_mailing }}' required>
<option value=''>-- Select --</option>
<option <?= 'YES' === (old('isSameAddressForHomeAndMailing') ? old('isSameAddressForHomeAndMailing') : $record->is_same_address_for_home_and_mailing) ? 'selected' : '' ?> value='YES'>YES</option>
<option <?= 'NO' === (old('isSameAddressForHomeAndMailing') ? old('isSameAddressForHomeAndMailing') : $record->is_same_address_for_home_and_mailing) ? 'selected' : '' ?> value='NO'>NO</option>
<option <?= 'UNKNOWN' === (old('isSameAddressForHomeAndMailing') ? old('isSameAddressForHomeAndMailing') : $record->is_same_address_for_home_and_mailing) ? 'selected' : '' ?> value='UNKNOWN'>UNKNOWN</option>
</select>
</div>
<div class='form-group mb-3'>
<label class='control-label'>Home Address Line 1 </label>
<input class='form-control' type='text' name='homeAddressLine1' value='{{ old('homeAddressLine1') ? old('homeAddressLine1') : $record->home_address_line1 }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Home Address Line 2 </label>
<input class='form-control' type='text' name='homeAddressLine2' value='{{ old('homeAddressLine2') ? old('homeAddressLine2') : $record->home_address_line2 }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Home Address City </label>
<input class='form-control' type='text' name='homeAddressCity' value='{{ old('homeAddressCity') ? old('homeAddressCity') : $record->home_address_city }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Home Address State </label>
<input class='form-control' type='text' name='homeAddressState' value='{{ old('homeAddressState') ? old('homeAddressState') : $record->home_address_state }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Home Address Zip </label>
<input class='form-control' type='text' name='homeAddressZip' value='{{ old('homeAddressZip') ? old('homeAddressZip') : $record->home_address_zip }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Home Address Geo Lat </label>
<input class='form-control' type='number' name='homeAddressGeoLat' value='{{ old('homeAddressGeoLat') ? old('homeAddressGeoLat') : $record->home_address_geo_lat }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Home Address Geo Long </label>
<input class='form-control' type='number' name='homeAddressGeoLong' value='{{ old('homeAddressGeoLong') ? old('homeAddressGeoLong') : $record->home_address_geo_long }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Mailing Address Line 1 </label>
<input class='form-control' type='text' name='mailingAddressLine1' value='{{ old('mailingAddressLine1') ? old('mailingAddressLine1') : $record->mailing_address_line1 }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Mailing Address Line 2 </label>
<input class='form-control' type='text' name='mailingAddressLine2' value='{{ old('mailingAddressLine2') ? old('mailingAddressLine2') : $record->mailing_address_line2 }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Mailing Address City </label>
<input class='form-control' type='text' name='mailingAddressCity' value='{{ old('mailingAddressCity') ? old('mailingAddressCity') : $record->mailing_address_city }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Mailing Address State </label>
<input class='form-control' type='text' name='mailingAddressState' value='{{ old('mailingAddressState') ? old('mailingAddressState') : $record->mailing_address_state }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Mailing Address Zip </label>
<input class='form-control' type='text' name='mailingAddressZip' value='{{ old('mailingAddressZip') ? old('mailingAddressZip') : $record->mailing_address_zip }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Mailing Address Geo Lat </label>
<input class='form-control' type='number' name='mailingAddressGeoLat' value='{{ old('mailingAddressGeoLat') ? old('mailingAddressGeoLat') : $record->mailing_address_geo_lat }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Mailing Address Geo Long </label>
<input class='form-control' type='number' name='mailingAddressGeoLong' value='{{ old('mailingAddressGeoLong') ? old('mailingAddressGeoLong') : $record->mailing_address_geo_long }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Has Secondary Address </label>
<select class='form-control' name='hasSecondaryAddress' value='{{ old('hasSecondaryAddress') ? old('hasSecondaryAddress') : '' }}' >
<option value=''>-- Select --</option>
<option <?= 'YES' === (old('hasSecondaryAddress') ? old('hasSecondaryAddress') : '') ? 'selected' : '' ?> value='YES'>YES</option>
<option <?= 'NO' === (old('hasSecondaryAddress') ? old('hasSecondaryAddress') : '') ? 'selected' : '' ?> value='NO'>NO</option>
<option <?= 'UNKNOWN_has_secondary_address' === (old('hasSecondaryAddress') ? old('hasSecondaryAddress') : '') ? 'selected' : '' ?> value='UNKNOWN_has_secondary_address'>UNKNOWN_has_secondary_address</option>
</select>
</div>
<div class='form-group mb-3'>
<label class='control-label'>Reason For Secondary Address </label>
<input class='form-control' type='text' name='reasonForSecondaryAddress' value='{{ old('reasonForSecondaryAddress') ? old('reasonForSecondaryAddress') : $record->reason_for_secondary_address }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>When Is Client At Secondary Address </label>
<input class='form-control' type='text' name='whenIsClientAtSecondaryAddress' value='{{ old('whenIsClientAtSecondaryAddress') ? old('whenIsClientAtSecondaryAddress') : $record->when_is_client_at_secondary_address }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Is Same Secondary Address For Home And Mailing *</label>
<select class='form-control' name='isSameSecondaryAddressForHomeAndMailing' value='{{ old('isSameSecondaryAddressForHomeAndMailing') ? old('isSameSecondaryAddressForHomeAndMailing') : $record->is_same_secondary_address_for_home_and_mailing }}' required>
<option value=''>-- Select --</option>
<option <?= 'YES' === (old('isSameSecondaryAddressForHomeAndMailing') ? old('isSameSecondaryAddressForHomeAndMailing') : $record->is_same_secondary_address_for_home_and_mailing) ? 'selected' : '' ?> value='YES'>YES</option>
<option <?= 'NO' === (old('isSameSecondaryAddressForHomeAndMailing') ? old('isSameSecondaryAddressForHomeAndMailing') : $record->is_same_secondary_address_for_home_and_mailing) ? 'selected' : '' ?> value='NO'>NO</option>
<option <?= 'UNKNOWN' === (old('isSameSecondaryAddressForHomeAndMailing') ? old('isSameSecondaryAddressForHomeAndMailing') : $record->is_same_secondary_address_for_home_and_mailing) ? 'selected' : '' ?> value='UNKNOWN'>UNKNOWN</option>
</select>
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Home Address Line 1 </label>
<input class='form-control' type='text' name='secondaryHomeAddressLine1' value='{{ old('secondaryHomeAddressLine1') ? old('secondaryHomeAddressLine1') : $record->secondary_home_address_line1 }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Home Address Line 2 </label>
<input class='form-control' type='text' name='secondaryHomeAddressLine2' value='{{ old('secondaryHomeAddressLine2') ? old('secondaryHomeAddressLine2') : $record->secondary_home_address_line2 }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Home Address City </label>
<input class='form-control' type='text' name='secondaryHomeAddressCity' value='{{ old('secondaryHomeAddressCity') ? old('secondaryHomeAddressCity') : $record->secondary_home_address_city }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Home Address State </label>
<input class='form-control' type='text' name='secondaryHomeAddressState' value='{{ old('secondaryHomeAddressState') ? old('secondaryHomeAddressState') : $record->secondary_home_address_state }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Home Address Zip </label>
<input class='form-control' type='text' name='secondaryHomeAddressZip' value='{{ old('secondaryHomeAddressZip') ? old('secondaryHomeAddressZip') : $record->secondary_home_address_zip }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Home Address Geo Lat </label>
<input class='form-control' type='number' name='secondaryHomeAddressGeoLat' value='{{ old('secondaryHomeAddressGeoLat') ? old('secondaryHomeAddressGeoLat') : $record->secondary_home_address_geo_lat }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Home Address Geo Long </label>
<input class='form-control' type='number' name='secondaryHomeAddressGeoLong' value='{{ old('secondaryHomeAddressGeoLong') ? old('secondaryHomeAddressGeoLong') : $record->secondary_home_address_geo_long }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Mailing Address Line 1 </label>
<input class='form-control' type='text' name='secondaryMailingAddressLine1' value='{{ old('secondaryMailingAddressLine1') ? old('secondaryMailingAddressLine1') : $record->secondary_mailing_address_line1 }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Mailing Address Line 2 </label>
<input class='form-control' type='text' name='secondaryMailingAddressLine2' value='{{ old('secondaryMailingAddressLine2') ? old('secondaryMailingAddressLine2') : $record->secondary_mailing_address_line2 }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Mailing Address City </label>
<input class='form-control' type='text' name='secondaryMailingAddressCity' value='{{ old('secondaryMailingAddressCity') ? old('secondaryMailingAddressCity') : $record->secondary_mailing_address_city }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Mailing Address State </label>
<input class='form-control' type='text' name='secondaryMailingAddressState' value='{{ old('secondaryMailingAddressState') ? old('secondaryMailingAddressState') : $record->secondary_mailing_address_state }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Mailing Address Zip </label>
<input class='form-control' type='text' name='secondaryMailingAddressZip' value='{{ old('secondaryMailingAddressZip') ? old('secondaryMailingAddressZip') : $record->secondary_mailing_address_zip }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Mailing Address Geo Lat </label>
<input class='form-control' type='number' name='secondaryMailingAddressGeoLat' value='{{ old('secondaryMailingAddressGeoLat') ? old('secondaryMailingAddressGeoLat') : $record->secondary_mailing_address_geo_lat }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Secondary Mailing Address Geo Long </label>
<input class='form-control' type='number' name='secondaryMailingAddressGeoLong' value='{{ old('secondaryMailingAddressGeoLong') ? old('secondaryMailingAddressGeoLong') : $record->secondary_mailing_address_geo_long }}' >
</div>
        <div class="form-group mb-3 d-flex justify-content-center">
            <button class="btn btn-sm btn-primary mr-3 px-5">Submit</button>
            <a href="{{route('clients-view', ['uid' => $record->uid])}}" class="btn btn-sm btn-default px-5" up-close>Cancel</a>
        </div>
    </form>

    </div></div>

@endsection
