{% load qommon %}
<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.is_required %}widget-required{% else %}widget-optional{% endif %}
     {% if widget.is_prefilled %}widget-prefilled{% endif %}{% endblock %}"
     {% block widget-attrs %}
     {% 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 %}
     {% if widget.a11y_role %}role="{{ a11y_role }}"{% endif %}
     {% if widget.a11y_labelledby %}aria-labelledby="form_label_{{widget.name}}"{% endif %}
     {% for attr in widget.prefill_attributes %}
     data-{{attr}}="{{widget.prefill_attributes|get:attr}}"
     {% endfor %}
     {% if "data-dynamic-display-child-of" in widget.attrs %}
     data-dynamic-display-child-of="{{widget.attrs|get:"data-dynamic-display-child-of"}}"
     {% endif %}
     {% if "data-dynamic-display-value" in widget.attrs %}
     data-dynamic-display-value="{{widget.attrs|get:"data-dynamic-display-value"}}"
     {% endif %}
     {% if "data-dynamic-display-value-in" in widget.attrs %}
     data-dynamic-display-value-in="{{widget.attrs|get:"data-dynamic-display-value-in"}}"
     {% endif %}
     {% if widget.live_condition_source %}data-live-source="true"{% endif %}
     {% endblock %}
     >
  {% block widget-title %}
  {{widget.rendered_title}}
  {% endblock %}
  {% block widget-content %}
  <div class="content {{widget.content.content_extra_css_class}}"
     {% for attr, value in widget.content_extra_attributes.items %}
     {{attr}}="{{value}}"
     {% endfor %}
       >
    {% block widget-control %}{{widget.render_content|safe}}{% endblock %}
    {% block widget-error %}{{widget.rendered_error}}{% endblock %}
    {% block widget-hint %}{{widget.rendered_hint}}{% endblock %}
  </div>
  {% endblock %}
  {% if widget.render_br %}
  <br class="content {{widget.content.content_extra_css_class}}">
  {% endif %}
</div>
