When editing a Customer, pre-select its current Mailbox
This commit is contained in:
parent
52985cd5a0
commit
829dcb49ad
1 changed files with 11 additions and 3 deletions
|
@ -17,10 +17,18 @@
|
|||
<div>
|
||||
<div class="input-group input-group-flex input-sized-lg">
|
||||
<select class="form-control" name="mailbox" required>
|
||||
<!-- TODO: Automatically select the Mailbox currently set, if there is one. -->
|
||||
@if($customer->mailbox_id == null)
|
||||
<option value="" disabled selected>---</option>
|
||||
@endif
|
||||
@foreach($mailboxes as $mailbox)
|
||||
<option value="{{ $mailbox->id }}">{{ $mailbox->name }}</option>
|
||||
<option
|
||||
value="{{ $mailbox->id }}"
|
||||
@if($mailbox->id == $customer->mailbox_id)
|
||||
selected
|
||||
@endif
|
||||
>
|
||||
{{ $mailbox->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue