<div class="form-row">
    <div class="form-item">
        <label>Rental ID</label>
        <input type="text" name="rentalID" value="<%= rental.rentalID %>">
    </div>
</div>

<div class="form-row">
    <div class="form-item">
        <label>Customer</label>
        <select name="customer">
            <% customers.forEach(customer=> { %>
                <% if (customer.id===rental.customer) { %>
                    <option selected label="<%= customer.fullName %>" value="<%= customer.id %>">
                        <% } else { %>
                    <option label="<%= customer.fullName %>" value="<%= customer.id %>">
                        <% } %>
                            <% }) %>
        </select>
    </div>
    <div class="form-item">
        <label>Copy</label>
        <select name="copy">
            <% copies.forEach(copy=> { %>
                <% if (copy.id===rental.copy) { %>
                    <option selected label="<%= copy.copyID %>" value="<%= copy.id %>">
                        <% } else { %>
                    <option label="<%= copy.copyID %>" value="<%= copy.id %>">
                        <% } %>
                            <% }) %>
        </select>
    </div>
</div>

<div class="form-row">
    <div class="form-item">
        <label>Borrow Date</label>
        <input type="date" name="borrowDate" value="<%= rental.borrowDate == null ? '' :
        rental.borrowDate.toISOString().split('T')[0] %>">
    </div>
    <div class="form-item">
        <label>Expected Return Date</label>
        <input type="date" name="expectedReturnDate" value="<%= rental.expectedReturnDate == null ? '' :
        rental.expectedReturnDate.toISOString().split('T')[0] %>">
    </div>
</div>

<div class="form-row">
    <div class="form-item">
        <label>Actual Return Date</label>
        <input type="date" name="actualReturnDate" value="<%= rental.actualReturnDate == null ? '' :
        rental.actualReturnDate.toISOString().split('T')[0] %>">
    </div>
    <div class="form-item">
        <label>Status</label>
        <select name="status">
            <option value="Returned">Returned</option>
            <option value="Late">Late</option>
            <option value="Borrowed">Borrowed</option>
        </select>
    </div>
</div>