@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>Relationships Add New</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/relationship/create">
        <input type="hidden" name="_success" value="{{route('my_clients_SINGLE-SUB_relationships', ['uid' => $record->uid])}}">
        <input type="hidden" name="_return" value="{{route('my_clients_SINGLE-ACTION_relationshipsAddNew', ['uid' => $record->uid])}}">
        <input class='form-control' type='hidden' name='clientUid' value='{{ old('clientUid') ? old('clientUid') : $record->uid }}' >
<div class='form-group mb-3'>
<label class='control-label'>Relationship To Client </label>
<input class='form-control' type='text' name='relationshipToClient' value='{{ old('relationshipToClient') ? old('relationshipToClient') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Relationship Memo </label>
<input class='form-control' type='text' name='relationshipMemo' value='{{ old('relationshipMemo') ? old('relationshipMemo') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Name Prefix </label>
<input class='form-control' type='text' name='namePrefix' value='{{ old('namePrefix') ? old('namePrefix') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Name First </label>
<input class='form-control' type='text' name='nameFirst' value='{{ old('nameFirst') ? old('nameFirst') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Name Middle </label>
<input class='form-control' type='text' name='nameMiddle' value='{{ old('nameMiddle') ? old('nameMiddle') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Name Last </label>
<input class='form-control' type='text' name='nameLast' value='{{ old('nameLast') ? old('nameLast') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Name Suffix </label>
<input class='form-control' type='text' name='nameSuffix' value='{{ old('nameSuffix') ? old('nameSuffix') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Name Maiden </label>
<input class='form-control' type='text' name='nameMaiden' value='{{ old('nameMaiden') ? old('nameMaiden') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Name Previous </label>
<input class='form-control' type='text' name='namePrevious' value='{{ old('namePrevious') ? old('namePrevious') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Organization Name </label>
<input class='form-control' type='text' name='organizationName' value='{{ old('organizationName') ? old('organizationName') : '' }}' >
</div>
<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') : '' }}' >
</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') : '' }}' >
</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') : '' }}' >
</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') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Home Address </label>
<input class='form-control' type='text' name='homeAddress' value='{{ old('homeAddress') ? old('homeAddress') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Mailing Address </label>
<input class='form-control' type='text' name='mailingAddress' value='{{ old('mailingAddress') ? old('mailingAddress') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Email Address </label>
<input class='form-control' type='text' name='emailAddress' value='{{ old('emailAddress') ? old('emailAddress') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Is Hispanic </label>
<select class='form-control' name='isHispanic' value='{{ old('isHispanic') ? old('isHispanic') : '' }}' >
<option value=''>-- Select --</option>
<option <?= 'YES' === (old('isHispanic') ? old('isHispanic') : '') ? 'selected' : '' ?> value='YES'>YES</option>
<option <?= 'NO' === (old('isHispanic') ? old('isHispanic') : '') ? 'selected' : '' ?> value='NO'>NO</option>
<option <?= 'UNKNOWN' === (old('isHispanic') ? old('isHispanic') : '') ? 'selected' : '' ?> value='UNKNOWN'>UNKNOWN</option>
</select>
</div>
<div class='form-group mb-3'>
<label class='control-label'>Is Black Or AA </label>
<select class='form-control' name='isBlackOrAA' value='{{ old('isBlackOrAA') ? old('isBlackOrAA') : '' }}' >
<option value=''>-- Select --</option>
<option <?= 'YES' === (old('isBlackOrAA') ? old('isBlackOrAA') : '') ? 'selected' : '' ?> value='YES'>YES</option>
<option <?= 'NO' === (old('isBlackOrAA') ? old('isBlackOrAA') : '') ? 'selected' : '' ?> value='NO'>NO</option>
<option <?= 'UNKNOWN' === (old('isBlackOrAA') ? old('isBlackOrAA') : '') ? 'selected' : '' ?> value='UNKNOWN'>UNKNOWN</option>
</select>
</div>
<div class='form-group mb-3'>
<label class='control-label'>Ethnicities </label>
<input class='form-control' type='text' name='ethnicities' value='{{ old('ethnicities') ? old('ethnicities') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Race </label>
<input class='form-control' type='text' name='race' value='{{ old('race') ? old('race') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Specific Races </label>
<input class='form-control' type='text' name='specificRaces' value='{{ old('specificRaces') ? old('specificRaces') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Preferred Language </label>
<input class='form-control' type='text' name='preferredLanguage' value='{{ old('preferredLanguage') ? old('preferredLanguage') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Other Languages </label>
<input class='form-control' type='text' name='otherLanguages' value='{{ old('otherLanguages') ? old('otherLanguages') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>English Level </label>
<input class='form-control' type='text' name='englishLevel' value='{{ old('englishLevel') ? old('englishLevel') : '' }}' >
</div>
<div class='form-group mb-3'>
<label class='control-label'>Contact Client </label>
<select class='form-control' name='contactClientUid' value='{{ old('contactClientUid') ? old('contactClientUid') : '' }}' >
<option value=''>-- Select --</option>
<?php $dbOptions = \Illuminate\Support\Facades\DB::table('client')->get(); ?>
<?php foreach($dbOptions as $o): ?>
<option <?= $o->uid === (old('contactClientUid') ? old('contactClientUid') : '') ? 'selected' : '' ?> value='<?= $o->uid ?>'><?= $o->name_first ?> (<?= $o->uid ?>)</option>
<?php endforeach; ?>
</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_SINGLE-SUB_relationships', ['uid' => $record->uid])}}" class="btn btn-sm btn-default px-5" up-close>Cancel</a>
        </div>
    </form>

    </div></div>

@endsection
