Skip to content

Commit bbc3341

Browse files
committed
fixed add time button rendering issue
1 parent 904cc0a commit bbc3341

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

static/js/event-management.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ document.addEventListener("DOMContentLoaded", () => {
346346
// validate end times
347347
document.querySelectorAll("input[name='end_time[]']").forEach(validateEndTime);
348348

349-
toggleAddTimeButton();
349+
if (addTimeButton) toggleAddTimeButton();
350350
}
351351

352352
initialiseTimes();

templates/events/form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ <h1>{% if event %}Edit{% else %}Create{% endif %} Event(s)</h1>
217217
</div>
218218
</div>
219219

220-
{% if event %}
220+
{% if not event %}
221221
<!-- add time -->
222222
<div class="col-12 d-flex justify-content-center">
223223
<button type="button" class="btn btn-secondary disabled col-4" id="add-time">Add Time</button>

0 commit comments

Comments
 (0)