#{extends 'main.html' /}
#{set title:'Confirm ' + hotel.name + ' booking' /}

<h1>Confirm hotel booking</h1>

#{form @confirmBooking(hotel.id)}
    <p>
        <strong>Name:</strong> ${hotel.name}
    </p>
    <p>
        <strong>Address:</strong> ${hotel.address}
    </p>
    <p>
        <strong>City:</strong> ${hotel.city}
    </p>
    <p>
        <strong>State:</strong> ${hotel.state}
    </p>
    <p>
        <strong>Zip:</strong> ${hotel.zip}
    </p>
    <p>
        <strong>Country:</strong> ${hotel.country}
    </p>
    <p>
        <strong>Nightly rate:</strong> ${hotel.price}
    </p>
    <p>
        <strong>Beds:</strong> ${booking.beds}
        <input type="hidden" name="booking.beds" value="${booking.beds}">
    </p>
    <p>
        <strong>Total:</strong> ${booking.total.formatCurrency('USD')}
    </p>
    <p>
        <strong>Check in date:</strong> ${booking.checkinDate.format('yyyy-MM-dd')}
        <input type="hidden" name="booking.checkinDate" value="${booking.checkinDate.format('yyyy-MM-dd')}">
    </p>
    <p>
        <strong>Check out date:</strong> ${booking.checkoutDate.format('yyyy-MM-dd')}
        <input type="hidden" name="booking.checkoutDate" value="${booking.checkoutDate.format('yyyy-MM-dd')}">
    </p>
    <p>
        <strong>Credit card #:</strong> ${booking.creditCard}
        <input type="hidden" name="booking.creditCard" value="${booking.creditCard}">
        <input type="hidden" name="booking.creditCardName" value="${booking.creditCardName}">
        <input type="hidden" name="booking.creditCardExpiryMonth" value="${booking.creditCardExpiryMonth}">
        <input type="hidden" name="booking.creditCardExpiryYear" value="${booking.creditCardExpiryYear}">
    </p>
    
    <p class="buttons">
        <input type="submit" value="Confirm" name="confirm"> <input type="submit" value="Revise" name="revise"> <a href="@{show(hotel.id)}">Cancel</a>    
    </p>
#{/form}
