@extends('pro.my_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 Contact Details</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/editContactDetails">
        <input type="hidden" name="_success" value="{{route('my_clients-view', ['uid' => $record->uid])}}">
        <input type="hidden" name="_return" value="{{route('my_clients_SINGLE-ACTION_editContactDetails', ['uid' => $record->uid])}}">
        <div class='form-group mb-3'>
<label class='control-label'>Phone Home </label>
<input class='form-control' type='text' name='phoneHome' value='{{ old('phoneHome') ? old('phoneHome') : $record->phone_home }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Phone Mobile </label>
<input class='form-control' type='text' name='phoneMobile' value='{{ old('phoneMobile') ? old('phoneMobile') : $record->phone_mobile }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Phone Work </label>
<input class='form-control' type='text' name='phoneWork' value='{{ old('phoneWork') ? old('phoneWork') : $record->phone_work }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Phone Memo </label>
<input class='form-control' type='text' name='phoneMemo' value='{{ old('phoneMemo') ? old('phoneMemo') : $record->phone_memo }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Email Personal Primary </label>
<input class='form-control' type='text' name='emailPersonalPrimary' value='{{ old('emailPersonalPrimary') ? old('emailPersonalPrimary') : $record->email_personal_primary }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Email Personal Secondary </label>
<input class='form-control' type='text' name='emailPersonalSecondary' value='{{ old('emailPersonalSecondary') ? old('emailPersonalSecondary') : $record->email_personal_secondary }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Email Work Primary </label>
<input class='form-control' type='text' name='emailWorkPrimary' value='{{ old('emailWorkPrimary') ? old('emailWorkPrimary') : $record->email_work_primary }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Email Work Secondary </label>
<input class='form-control' type='text' name='emailWorkSecondary' value='{{ old('emailWorkSecondary') ? old('emailWorkSecondary') : $record->email_work_secondary }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Send Reminders By Email </label>
<select class='form-control' name='sendRemindersByEmail' value='{{ old('sendRemindersByEmail') ? old('sendRemindersByEmail') : $record->send_reminders_by_email }}' >
<option value=''>-- Select --</option>
<option <?= 'YES' === (old('sendRemindersByEmail') ? old('sendRemindersByEmail') : $record->send_reminders_by_email) ? 'selected' : '' ?> value='YES'>YES</option>
<option <?= 'NO' === (old('sendRemindersByEmail') ? old('sendRemindersByEmail') : $record->send_reminders_by_email) ? 'selected' : '' ?> value='NO'>NO</option>
<option <?= 'UKNOWN' === (old('sendRemindersByEmail') ? old('sendRemindersByEmail') : $record->send_reminders_by_email) ? 'selected' : '' ?> value='UKNOWN'>UKNOWN</option>
</select>
</div>
<div class='form-group mb-3'>
<label class='control-label'>Send Reminders By Text </label>
<select class='form-control' name='sendRemindersByText' value='{{ old('sendRemindersByText') ? old('sendRemindersByText') : $record->send_reminders_by_text }}' >
<option value=''>-- Select --</option>
<option <?= 'YES' === (old('sendRemindersByText') ? old('sendRemindersByText') : $record->send_reminders_by_text) ? 'selected' : '' ?> value='YES'>YES</option>
<option <?= 'NO' === (old('sendRemindersByText') ? old('sendRemindersByText') : $record->send_reminders_by_text) ? 'selected' : '' ?> value='NO'>NO</option>
<option <?= 'UNKNOWN' === (old('sendRemindersByText') ? old('sendRemindersByText') : $record->send_reminders_by_text) ? 'selected' : '' ?> value='UNKNOWN'>UNKNOWN</option>
</select>
</div>
<div class='form-group mb-3'>
<label class='control-label'>Send Reminders By Phone </label>
<select class='form-control' name='sendRemindersByPhone' value='{{ old('sendRemindersByPhone') ? old('sendRemindersByPhone') : $record->send_reminders_by_phone }}' >
<option value=''>-- Select --</option>
<option <?= 'YES' === (old('sendRemindersByPhone') ? old('sendRemindersByPhone') : $record->send_reminders_by_phone) ? 'selected' : '' ?> value='YES'>YES</option>
<option <?= 'NO' === (old('sendRemindersByPhone') ? old('sendRemindersByPhone') : $record->send_reminders_by_phone) ? 'selected' : '' ?> value='NO'>NO</option>
<option <?= 'UNKNOWN' === (old('sendRemindersByPhone') ? old('sendRemindersByPhone') : $record->send_reminders_by_phone) ? 'selected' : '' ?> value='UNKNOWN'>UNKNOWN</option>
</select>
</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('my_clients-view', ['uid' => $record->uid])}}" class="btn btn-sm btn-default px-5" up-close>Cancel</a>
        </div>
    </form>

    </div></div>

@endsection
