toodego: sync widget.html template with wcs (#52483)
gitea-wip/publik-base-theme/pipeline/head There was a failure building this commit Details
gitea/publik-base-theme/pipeline/head Something is wrong with the build of this commit Details

This commit is contained in:
Frédéric Péters 2021-03-30 09:20:22 +02:00
parent 6d4596de4b
commit 6d43676709
1 changed files with 4 additions and 2 deletions

View File

@ -1,12 +1,13 @@
{% load qommon %}
<div class="widget {{widget.class_name}} {{widget.extra_css_class}}
<div class="{% block widget-css-classes %}widget {{widget.class_name}} {{widget.extra_css_class}}
{% if widget.readonly %}widget-readonly{% endif %}
{% if widget.get_error %}widget-with-error{% endif %}
{% if widget.get_message %}widget-with-message{% endif %}
{% if widget.is_required %}widget-required{% else %}widget-optional{% endif %}
{% if widget.is_prefilled %}widget-prefilled{% endif %}"
{% if widget.is_prefilled %}widget-prefilled{% endif %}{% endblock %}"
{% if widget.is_hidden %}style="display: none"{% endif %}
{% if widget.field %}data-field-id="{{ widget.field.id }}"{% endif %}
data-widget-name="{{ widget.name }}"
{% if widget.div_id %}id="{{widget.div_id}}" data-valuecontainerid="form_{{widget.name}}"{% endif %}
{% for attr in widget.prefill_attributes %}
data-{{attr}}="{{widget.prefill_attributes|get:attr}}"
@ -27,6 +28,7 @@
{% endblock %}
{% block widget-content %}
<div class="content {{widget.content.content_extra_css_class}}"
aria-labelledby="form_label_{{widget.name}}"
{% for attr, value in widget.content_extra_attributes.items %}
{{attr}}="{{value}}"
{% endfor %}