wcs: reindent famille-reservations-recurrentes widget (#87889)

This commit is contained in:
Nicolas Roche 2024-03-07 15:15:03 +01:00
parent b40f288b0b
commit f0f06875c8
1 changed files with 18 additions and 12 deletions

View File

@ -5,18 +5,24 @@
{% regroup widget.get_options by options.day as options_list %}
{% for day, options in options_list %}
{% for option in options %}
<li data-date="{{ option.options.date }}"><label for="{{ widget.get_name_for_id }}_op_{{ forloop.counter0 }}"><input
id="{{ widget.get_name_for_id }}_op_{{ forloop.counter0 }}"
{% if option.selected %}checked="checked"
{% elif widget.readonly or option.disabled %}disabled{% endif %}
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}"{% endfor %}
type="checkbox"
data-event-id="{{ option.options.id }}"
data-overlaps="{{ option.options.overlaps|join:" " }}"
{% if widget.readonly %}value="yes" disabled
{% else %}name="{{ option.name }}" value="yes"
{% endif %}><span>{{ option.label }}</span></label>
{% if widget.readonly and option.selected %}<input type="hidden" name="{{ option.name }}" value="yes">{% endif %}
<li data-date="{{ option.options.date }}">
<label for="{{ widget.get_name_for_id }}_op_{{ forloop.counter0 }}">
<input
id="{{ widget.get_name_for_id }}_op_{{ forloop.counter0 }}"
{% if option.selected %}checked="checked"
{% elif widget.readonly or option.disabled %}disabled{% endif %}
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}"{% endfor %}
type="checkbox"
data-event-id="{{ option.options.id }}"
data-overlaps="{{ option.options.overlaps|join:" " }}"
{% if widget.readonly %}value="yes" disabled
{% else %}name="{{ option.name }}" value="yes"
{% endif %}>
<span>{{ option.label }}</span>
{% if widget.readonly and option.selected %}
<input type="hidden" name="{{ option.name }}" value="yes">
{% endif %}
</label>
</li>
{% endfor %}
{% endfor %}