<% for date_type, formats in date_formats %>
  {{#ifCond params.date_type "===" "<%= date_type %>"}}
    <% if(formats | length == 1) %>
      <!-- display format as hidden value -->
      <input type="hidden" name="params[date_format]" value="<%= formats[0] %>" />
    <% else %>
      <!-- display label -->
      <p class="clearfix">
        <label><%= __('Order') %></label>
        <!-- display all possible date formats -->
        <select name="params[date_format]">
          <% for format in formats %>
            <option
              {{#ifCond params.date_format "===" "<%= format %>"}}
                selected="selected"
              {{/ifCond}}
              value="<%= format %>"><%= format %></option>
          <% endfor %>
        </select>
      </p>
    <% endif %>
  {{/ifCond}}
<% endfor %>