Skip to content

Commit

Permalink
Improved Selected on Select
Browse files Browse the repository at this point in the history
  • Loading branch information
MGeurts committed Dec 20, 2024
1 parent a83bd57 commit b4039df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resources/views/auth/register.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<div class="md:w-2/3">
<select id="language" class="block w-full rounded" name="language" required>
@foreach (config('app.available_locales') as $locale_name => $available_locale)
<option value="{{ $available_locale }}" @if ($available_locale == app()->getLocale()) selected @endif>{{ $locale_name }}</option>
<option value="{{ $available_locale }}" @selected($available_locale == app()->getLocale())>{{ $locale_name }}</option>
@endforeach
</select>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<x-label for="language" value="{{ __('user.language') }} :" />
<select id="language" class="block w-full mt-1 rounded" name="language" wire:model="state.language" required>
@foreach (config('app.available_locales') as $locale_name => $available_locale)
<option value="{{ $available_locale }}" @if (old('language') == '{{ $available_locale }}') selected @endif>{{ $locale_name }}</option>
<option value="{{ $available_locale }}" @selected(old('language') == $available_locale)>{{ $locale_name }}</option>
@endforeach
</select>
</div>
Expand All @@ -104,7 +104,7 @@
<x-label for="timezone" value="{{ __('user.timezone') }} :" />
<select id="timezone" class="block w-full mt-1 rounded" name="timezone" wire:model="state.timezone" required>
@foreach (timezone_identifiers_list() as $timezone)
<option value="{{ $timezone }}" @if (old('timezone') == '{{ $timezone }}') selected @endif>{{ $timezone }}</option>
<option value="{{ $timezone }}" @selected(old('timezone') == $timezone)>{{ $timezone }}</option>
@endforeach
</select>
</div>
Expand Down

0 comments on commit b4039df

Please sign in to comment.