widget reservations récurrentes : bug quand on clic sur le label (#87889) #530
|
@ -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.parentloop.counter0 }}.{{ forloop.counter0 }}">
|
||||
<input
|
||||
id="{{ widget.get_name_for_id }}_op_{{ forloop.parentloop.counter0 }}.{{ 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 %}
|
||||
|
|
Loading…
Reference in New Issue