Projet

Général

Profil

0001-templates-customize-django-s-radio-button-template-5.patch

Serghei Mihai, 09 juin 2021 09:55

Télécharger (1,16 ko)

Voir les différences:

Subject: [PATCH] templates: customize django's radio button template (#54642)

 gadjo/templates/django/forms/widgets/radio.html | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 gadjo/templates/django/forms/widgets/radio.html
gadjo/templates/django/forms/widgets/radio.html
1
{% with id=widget.attrs.id %}<ul{% if id %} id="{{ id }}"{% endif %}{% if widget.attrs.class %} class="{{ widget.attrs.class }}"{% endif %}{% if id %} aria-labelledby="{{ id }}_0"{% endif %} role="radiogroup">{% for group, options, index in widget.optgroups %}{% if group %}
2
  <li>{{ group }}<ul{% if id %} id="{{ id }}_{{ index }}"{% endif %}>{% endif %}{% for option in options %}
3
    <li>{% include option.template_name with widget=option %}</li>{% endfor %}{% if group %}
4
  </ul></li>{% endif %}{% endfor %}
5
</ul>{% endwith %}
0
-