You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.5 KiB
PHTML
31 lines
1.5 KiB
PHTML
<div class="modal modal fade" id="deleteContactModal" tabindex="-1" aria-labelledby="deleteContactModalLabel"
|
|
aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h1 class="modal-title fs-5" id="deleteContactModalLabel">Delete Contact</h1>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<form action="{{route('contacts.requestDestroy')}}" method="post">
|
|
@csrf
|
|
<div class="modal-body">
|
|
@if(sizeof($contacts) !== 0)
|
|
<select name="contact" id="contact" class="form-select">
|
|
@foreach($contacts as $contact)
|
|
<option value="{{ $contact->id }}"> {{ $contact->first_name . ' ' . $contact->last_name }}</option>
|
|
@endforeach
|
|
</select>
|
|
@else
|
|
There are no contacts to delete.
|
|
@endif
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
|
@if (sizeof($contacts) !== 0)
|
|
<button type="submit" class="btn btn-danger">Delete contact</button>
|
|
@endif
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div> |