<form class="plain" method="POST" tal:attributes="action request/URL"
      i18n:domain="schooltool">

  <div class="status"  tal:condition="view/error">
    <div class="summary ui-state-error ui-corner-all">
      <span class="ui-icon ui-icon-alert">icon</span>
      <tal:block content="view/error">
        [error message]
        </tal:block>
    </div>
  </div>

  <fieldset>
    <legend><span tal:content="view/label">[title]</span></legend>

    <div class="row">
      <p tal:condition="view/description"
         tal:content="view/description">[informative text]</p>
    </div>

  <div class="row" tal:repeat="slotnr python:range(view.numPeriods())">
  <tal:block define="slot python:view.periods()[slotnr]">
    <select tal:attributes="name name"
            tal:define="name string:period_${slotnr}">
      <option tal:repeat="period view/periods"
              tal:attributes="selected
                      python:(period == request.get(name, slot)) or None"
              tal:content="period" />
    </select>
  </tal:block>
  </div>

  </fieldset>

  <div class="buttons">
    <input type="submit" class="button-cancel" name="STEP_BACK" value="Back"
           i18n:attributes="value" />
    <input type="submit" class="button-ok" name="NEXT" value="Next"
           i18n:attributes="value" />
    <input type="hidden" name="viewstate"
           tal:attributes="value json: view/view/json_state" />
  </div>

</form>
