<div class="field" tal:attributes="style view/style|nothing" i18n:domain="senaite.core"
     tal:define="groups python:['Day', 'Week', 'Month', 'Year']">

  <label for="GroupingPeriod" i18n:translate="">Group by</label>

  <select name="GroupingPeriod:ignore_empty"
          class="form-control form-control-sm"
          id="GroupingPeriod">
    <option tal:condition="python:view.allow_blank" value=""/>
    <tal:groups tal:repeat="groupingperiod groups">
      <option tal:attributes="value python:groupingperiod;
                              selected python:request.get('groupingperiod', '') == groupingperiod and 'selected' or ''"
              tal:content="groupingperiod">
      </option>
    </tal:groups>
  </select>

</div>
