fix(suff): use deselectable checkboxes for booking mode on staff page

Same fix as self-booking page: radio buttons replaced with checkboxes
with mutual-exclusivity JS, so Gratis/Direkt-bar can be deselected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 19:00:57 +02:00
parent a0ed28c587
commit de140c3feb
+13 -2
View File
@@ -54,15 +54,26 @@
<form method="post" action="{% url 'suff:staff_book' tab_user.username %}">
{% csrf_token %}
<label class="for-free-toggle">
<input type="radio" name="booking_mode" value="for_free" />
<input type="checkbox" name="booking_mode" value="for_free" />
<span>Gratis (z.B. Artists am Spieltag)</span>
</label>
{% if not is_anonymous_target %}
<label class="for-free-toggle">
<input type="radio" name="booking_mode" value="cash_paid" />
<input type="checkbox" name="booking_mode" value="cash_paid" />
<span>Direkt bar bezahlt</span>
</label>
{% endif %}
<script>
document.querySelectorAll('input[name="booking_mode"]').forEach(function(cb) {
cb.addEventListener('change', function() {
if (this.checked) {
document.querySelectorAll('input[name="booking_mode"]').forEach(function(other) {
if (other !== cb) other.checked = false;
});
}
});
});
</script>
{% regroup drinks by alcohol_label as drink_groups %}
{% for group in drink_groups %}
<h4 class="drink-group-heading">{{ group.grouper }}</h4>