{% load qommon %}
<div class="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.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}}"
     {% 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 %}>
  {% block widget-title %}
  {{widget.rendered_title}}
  {% endblock %}
  {% block widget-content %}
  <div class="content {{widget.content.content_extra_css_class}}">
    {% block widget-error %}{{widget.rendered_error}}{% endblock %}
    {% block widget-control %}{{widget.render_content|safe}}{% endblock %}
    {% block widget-hint %}{{widget.rendered_hint}}{% endblock %}
    {% block widget-message %}{{widget.rendered_message}}{% endblock %}
  </div>
  {% endblock %}
  {% if widget.render_br %}
  <br class="content {{widget.content.content_extra_css_class}}">
  {% endif %}
</div>
