1 | <!DOCTYPE html>
|
---|
2 | <html lang="en">
|
---|
3 | <head>
|
---|
4 | <meta charset="UTF-8">
|
---|
5 | <title>Edit Reservation</title>
|
---|
6 | </head>
|
---|
7 | <div class="container mt-5">
|
---|
8 | <h2>Edit Reservation</h2>
|
---|
9 | <form th:action="@{'/reservations/edit/{reservationId}' (reservationId=${reservation?.getReservationID()})}" method="POST">
|
---|
10 | <div class="form-group">
|
---|
11 | <label for="reservationDateTime">Reservation Date and Time</label>
|
---|
12 | <input class="form-control"
|
---|
13 | id="reservationDateTime"
|
---|
14 | th:value="${#temporals.format(reservation?.reservationDateTime, 'yyyy-MM-dd HH:mm:ss')}"
|
---|
15 | readonly>
|
---|
16 | </div>
|
---|
17 |
|
---|
18 | <div class="form-group">
|
---|
19 | <label for="partySize">Party Size</label>
|
---|
20 | <input type="number" class="form-control"
|
---|
21 | id="partySize"
|
---|
22 | name="partySize"
|
---|
23 | th:value="${reservation?.getPartySize()}" required>
|
---|
24 | </div>
|
---|
25 |
|
---|
26 | <div class="form-group">
|
---|
27 | <label for="specialRequests">Special Requests</label>
|
---|
28 | <textarea class="form-control"
|
---|
29 | id="specialRequests"
|
---|
30 | name="specialRequests"
|
---|
31 | th:value="${reservation?.getSpecialRequests()}"
|
---|
32 | rows="3"></textarea>
|
---|
33 | </div>
|
---|
34 |
|
---|
35 | <div class="form-group">
|
---|
36 | <label for="checkInTime">Current timeSlot</label>
|
---|
37 | <input id="checkInTime" class="form-control"
|
---|
38 | th:value="${reservation?.getCheckInTime()}" readonly>
|
---|
39 | </div>
|
---|
40 | <div>
|
---|
41 | <label for="reservationDateTime">Available timeSlots</label>
|
---|
42 | <select class="form-control" name="reservationDateTime" id="reservationDateTime">
|
---|
43 | <option th:each="ts: ${reservation.getTable().getTimeSlots()}"
|
---|
44 | th:value="${ts}"
|
---|
45 | th:text="${#temporals.format(ts, 'HH:mm')}"></option>
|
---|
46 | </select>
|
---|
47 | </div>
|
---|
48 |
|
---|
49 | <!-- <div class="form-group">-->
|
---|
50 | <!-- <label for="paymentStatus">Payment Status</label>-->
|
---|
51 | <!-- <select class="form-control" id="paymentStatus" name="paymentStatus">-->
|
---|
52 | <!-- <option value="Unpaid">Unpaid</option>-->
|
---|
53 | <!-- <option value="Paid">Paid</option>-->
|
---|
54 | <!-- </select>-->
|
---|
55 | <!-- </div>-->
|
---|
56 |
|
---|
57 | <button type="submit" class="btn btn-primary">Update Reservation</button>
|
---|
58 | </form>
|
---|
59 | </div> |
---|