Jul 28 - Update schedule page's referred time

This commit is contained in:
2026-07-28 15:09:12 -04:00
parent 4bb345da39
commit 81aeeac3d2
6 changed files with 203 additions and 18 deletions
+8 -3
View File
@@ -40,7 +40,8 @@
{% endif %}
{% endwith %}
<form class="book__form" method="post" action="{{ url_for('demo') }}" novalidate>
<form class="book__form" method="post" action="{{ url_for('demo') }}" novalidate
data-slots-url="{{ url_for('demo_slots_api') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<!-- honeypot: hidden from people, irresistible to bots -->
<div class="book__hp" aria-hidden="true">
@@ -83,12 +84,14 @@
<div class="field">
<label for="preferred_time">Preferred time <span class="req">*</span></label>
<select id="preferred_time" name="preferred_time" required>
<option value="">Select a time…</option>
<option value="">{{ 'Select a time…' if slots else 'No times available' }}</option>
{% for slot in slots %}
<option value="{{ slot }}" {{ 'selected' if form.preferred_time == slot }}>{{ slot }}</option>
{% endfor %}
</select>
<p class="hint">{{ tz_label }}.</p>
<!-- Only free slots are listed: the server filters by the chosen date,
and demo-booking.js refreshes this list whenever the date changes. -->
<p class="hint" id="slot-note">{{ tz_label }}.</p>
</div>
</div>
@@ -108,6 +111,8 @@
<footer class="cta cta--slim">
<p class="cta__legal">© LT Services Inc. · JQC Quality Control Program</p>
</footer>
<script src="{{ asset_url('js/demo-booking.js') }}" defer></script>
</body>
</html>