<div xmlns:py="http://genshi.edgewall.org/" py:strip="True">
    <py:for each="c in w.children_hidden">
        ${c.display()}
    </py:for>
    <div py:for="c in w.children_non_hidden" class="form-group ${((c.validator and getattr(c.validator, 'required', getattr(c.validator, 'not_empty', False))) and ' required' or '') + (c.error_msg and ' has-error' or '')}" title="${w.hover_help and c.help_text or None}" py:attrs="c.container_attrs">
        <label for="${c.id}" class="${w.parent.labels_css_class} control-label">$c.label</label>
        <div class="${w.parent.input_wrappers_class}">
          ${c.display()}
        </div>
        <py:if test="w.parent.display_errors and c.error_msg">
          <span id="${c.compound_id}:error" class="help-block">${c.error_msg}</span>
        </py:if>
    </div>
    <div py:if="len(w.rollup_errors)" class="row">
      <div id="${w.compound_id}:error" class="form-has-errors">
        <py:for each="error in w.rollup_errors"><p>${error}</p></py:for>
      </div>
    </div>
</div>
