Major updates
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
>
|
||||
<option value=""></option>
|
||||
@foreach ($countries as $country)
|
||||
<option value="{{ $country->id }}" @selected((int) old('country_id', $company->country_id) === $country->id)>
|
||||
<option value="{{ $country->id }}" @selected((int) old('country_id', $company->address?->country_id) === $country->id)>
|
||||
{{ $country->display_name ?: $country->common_name ?: $country->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@php
|
||||
$address = $address ?? null;
|
||||
$inputClass = 'mt-2 h-12 w-full rounded-xl border-zinc-300 bg-white px-4 text-sm text-zinc-900 shadow-sm outline-none transition focus:border-blue-500 focus:ring-2 focus:ring-blue-500/30 dark:border-zinc-700 dark:bg-zinc-950 dark:text-white';
|
||||
$countryFieldId = 'address_country_id_' . md5(($defaultLabel ?? 'address') . '_' . ($address?->id ?? 'new'));
|
||||
@endphp
|
||||
|
||||
<div class="grid gap-5 md:grid-cols-2">
|
||||
@@ -45,18 +46,25 @@
|
||||
</div>
|
||||
|
||||
<div class="wms-select2-field">
|
||||
<label for="address_country_id" class="block text-sm font-semibold text-zinc-700 dark:text-zinc-200">Country</label>
|
||||
<label for="{{ $countryFieldId }}" class="block text-sm font-semibold text-zinc-700 dark:text-zinc-200">
|
||||
Country
|
||||
</label>
|
||||
|
||||
<select
|
||||
id="address_country_id"
|
||||
id="{{ $countryFieldId }}"
|
||||
name="country_id"
|
||||
data-wms-select2="true"
|
||||
data-wms-select2
|
||||
data-placeholder="Search and select country"
|
||||
class="wms-select2-control"
|
||||
required
|
||||
>
|
||||
<option value=""></option>
|
||||
|
||||
@foreach ($countries as $country)
|
||||
<option value="{{ $country->id }}" @selected((int) old('country_id', $address?->country_id) === $country->id)>
|
||||
<option
|
||||
value="{{ $country->id }}"
|
||||
@selected((int) old('country_id', $address?->country_id) === $country->id)
|
||||
>
|
||||
{{ $country->display_name ?: $country->common_name ?: $country->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
|
||||
Reference in New Issue
Block a user