<div class="form-row">
    <div class="form-item">
        <label>Name</label>
        <input type="text" name="name" value="<%= event.name %>">
    </div>
    <div class="form-item">
        <label>Topic</label>
        <select name="topic">
            <% topics.forEach(topic => { %>
                <% if (topic.id===event.topic) { %>
                    <option selected label="<%= topic.type %>" value="<%= topic.id %>">
                        <% } else { %>
                    <option label="<%= topic.type %>" value="<%= topic.id %>">
                        <% } %>
                            <% }) %>
        </select>
    </div>
</div>

<div class="form-row">
    <div class="form-item">
        <label>Type</label>
        <select name="type">
            <option value="Seminar">Seminar</option>
            <option value="Exhibition">Exhibition</option>
        </select>
    </div>
    <div class="form-item">
        <label>Start Time</label>
        <input type="datetime-local" name="startTime" value="<%= event.startTime == null ? '' :
        event.startTime.toISOString().split('T')[0] %>">
    </div>
</div>

<div class="form-row">
    <div class="form-item">
        <label>Expense</label>
        <input type="float" name="expense" min="0.0" step="0.01" value="<%= event.expense %>">
    </div>
    
    <div class="form-item">
        <label>End Time</label>
        <input type="datetime-local" name="endTime" value="<%= event.endTime == null ? '' :
        event.endTime.toISOString().split('T')[0] %>">
    </div>
</div>

<div class="form-row">
    <div class="form-item form-item-no-grow">
        <label>Event Cover</label>
        <input type="file" name="cover" class="book-cover filepond">
    </div>
    <div class="form-item">
        <label>Description</label>
        <textarea name="description"><%= event.description %></textarea>
    </div>
</div>