Fix FLEXIAPI-404 Prevent the account domain to be reset during creation on error

This commit is contained in:
Timothée Jaussoin 2025-10-15 11:15:32 +02:00
parent 9aeeb0fa73
commit 98d9d76225
2 changed files with 4 additions and 2 deletions

View file

@ -44,7 +44,7 @@
<div class="select"> <div class="select">
<select name="domain" @if (auth()->user()?->superAdmin) required @else disabled @endif> <select name="domain" @if (auth()->user()?->superAdmin) required @else disabled @endif>
@foreach ($domains as $space) @foreach ($domains as $space)
<option value="{{ $space->domain }}" @if ($account->domain == $space->domain) selected="selected" @endif> <option value="{{ $space->domain }}" @if ($account->domain == $space->domain || old('domain') == $space->domain) selected="selected" @endif>
{{ $space->domain }}</option> {{ $space->domain }}</option>
@endforeach @endforeach
</select> </select>

View file

@ -53,7 +53,9 @@
</div> </div>
<div class="oppose"> <div class="oppose">
<a href="{{ route('admin.account.index') }}" type="reset" class="btn tertiary">{{ __('Reset') }}</a> <a href="{{ route('admin.account.index') }}" type="reset" class="btn tertiary">{{ __('Reset') }}</a>
<button type="submit" class="btn">{{ __('Search') }}</button> <button type="submit" class="btn">
<i class="ph ph-magnifying-glass"></i>
</button>
</div> </div>
</form> </form>
</div> </div>