manager: fold check filters (#82839)
This commit is contained in:
parent
dae40958f4
commit
72be0166f3
|
@ -15,71 +15,71 @@
|
|||
</h3>
|
||||
<div>
|
||||
<form class="check-bookings-filters">
|
||||
{{ filterset.form.as_p }}
|
||||
<script>
|
||||
$(function() {
|
||||
$('form.check-bookings-filters input').on('change',
|
||||
function() {
|
||||
$(this).parents('form').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<fieldset class="gadjo-foldable gadjo-folded" id="filters">
|
||||
<legend class="gadjo-foldable-widget">{% trans "Filtering options" %}</legend>
|
||||
<div class="gadjo-folding">
|
||||
{{ filterset.form.as_p }}
|
||||
<button class="submit-button">{% trans "Apply" context 'form filtering action' %}</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<table class="main check-bookings">
|
||||
<tbody>
|
||||
{% if results and not event.checked and not event.check_locked %}
|
||||
<tr class="booking">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<table class="main check-bookings">
|
||||
<tbody>
|
||||
{% if results and not event.checked and not event.check_locked %}
|
||||
<tr class="booking">
|
||||
<td class="booking-actions">
|
||||
<form method="post" action="{% url 'chrono-manager-event-checked' pk=agenda.pk event_pk=object.pk %}">
|
||||
{% csrf_token %}
|
||||
<button class="submit-button">{% trans "Mark the event as checked" %}</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if booked_without_status %}
|
||||
{% if not event.checked or not agenda.disable_check_update %}
|
||||
<tr class="booking all-bookings">
|
||||
<td colspan="2"><b>{% trans "Mark all bookings without status:" %}</b></td>
|
||||
<td class="booking-actions">
|
||||
<form method="post" action="{% url 'chrono-manager-event-checked' pk=agenda.pk event_pk=object.pk %}">
|
||||
<form method="post" action="{% url 'chrono-manager-event-presence' pk=agenda.pk event_pk=object.pk %}" id="all-bookings-presence">
|
||||
{% csrf_token %}
|
||||
<button class="submit-button">{% trans "Mark the event as checked" %}</button>
|
||||
<button class="submit-button">{% trans "Presence" %}</button>
|
||||
{% if presence_form.check_type.field.choices.1 %}{{ presence_form.check_type }}{% endif %}
|
||||
<script>
|
||||
$(function() {
|
||||
$('#all-bookings-presence select').on('change',
|
||||
function() {
|
||||
$('#all-bookings-presence').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
<form method="post" action="{% url 'chrono-manager-event-absence' pk=agenda.pk event_pk=object.pk %}" id="all-bookings-absence">
|
||||
{% csrf_token %}
|
||||
<button class="submit-button">{% trans "Absence" %}</button>
|
||||
{% if absence_form.check_type.field.choices.1 %}{{ absence_form.check_type }}{% endif %}
|
||||
<script>
|
||||
$(function() {
|
||||
$('#all-bookings-absence select').on('change',
|
||||
function() {
|
||||
$('#all-bookings-absence').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if booked_without_status %}
|
||||
{% if not event.checked or not agenda.disable_check_update %}
|
||||
<tr class="booking all-bookings">
|
||||
<td colspan="2"><b>{% trans "Mark all bookings without status:" %}</b></td>
|
||||
<td class="booking-actions">
|
||||
<form method="post" action="{% url 'chrono-manager-event-presence' pk=agenda.pk event_pk=object.pk %}" id="all-bookings-presence">
|
||||
{% csrf_token %}
|
||||
<button class="submit-button">{% trans "Presence" %}</button>
|
||||
{% if presence_form.check_type.field.choices.1 %}{{ presence_form.check_type }}{% endif %}
|
||||
<script>
|
||||
$(function() {
|
||||
$('#all-bookings-presence select').on('change',
|
||||
function() {
|
||||
$('#all-bookings-presence').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
<form method="post" action="{% url 'chrono-manager-event-absence' pk=agenda.pk event_pk=object.pk %}" id="all-bookings-absence">
|
||||
{% csrf_token %}
|
||||
<button class="submit-button">{% trans "Absence" %}</button>
|
||||
{% if absence_form.check_type.field.choices.1 %}{{ absence_form.check_type }}{% endif %}
|
||||
<script>
|
||||
$(function() {
|
||||
$('#all-bookings-absence select').on('change',
|
||||
function() {
|
||||
$('#all-bookings-absence').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% for result in results %}
|
||||
<tr class="booking {% if agenda.booking_extra_user_block_template %}untoggled{% endif %}">
|
||||
{% include "chrono/manager_event_check_booking_fragment.html" with booking=result %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for result in results %}
|
||||
<tr class="booking {% if agenda.booking_extra_user_block_template %}untoggled{% endif %}">
|
||||
{% include "chrono/manager_event_check_booking_fragment.html" with booking=result %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% if object.waiting_list_places %}
|
||||
|
|
|
@ -19,17 +19,19 @@
|
|||
<p>{% trans "No opening hours this day." %}</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<form class="check-bookings-filters">
|
||||
{{ filterset.form.as_p }}
|
||||
<script>
|
||||
$(function() {
|
||||
$('form.check-bookings-filters input').on('change',
|
||||
function() {
|
||||
$(this).parents('form').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
<div class="section">
|
||||
<div>
|
||||
<form class="check-bookings-filters">
|
||||
<fieldset class="gadjo-foldable gadjo-folded" id="filters">
|
||||
<legend class="gadjo-foldable-widget">{% trans "Filtering options" %}</legend>
|
||||
<div class="gadjo-folding">
|
||||
{{ filterset.form.as_p }}
|
||||
<button class="submit-button">{% trans "Apply" context 'form filtering action' %}</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if results and not event.checked and not event.check_locked %}
|
||||
<form method="post" action="{% url 'chrono-manager-event-checked' pk=agenda.pk event_pk=event.pk %}">
|
||||
|
|
Loading…
Reference in New Issue