<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/">
  <xi:include href="admin.html" />
  <head>
    <title>[${iniadmin.section}]</title>
  </head>
  <body>
    <h2>[${iniadmin.section}]</h2>
    
    <div class="ini">
      <form method="post">
        <ul>
          <li py:for="idx, option in enumerate(iniadmin.options)" class="align${idx % 3}">
            <fieldset class="col${idx % 2}">
              <legend>${option.name}</legend>
              <py:choose>
                <div class="select" py:when="option.type == 'extension'">
                  <select name="${option.name}">
                    <py:for each="opt in option.options">
                      <py:choose>
                        <option value="${opt}" selected="selected" py:when="option.value == opt">${opt}</option>
                        <option value="${opt}" py:otherwise="">${opt}</option>
                      </py:choose>
                    </py:for>
                  </select>
                </div>
                <div class="bool" py:when="option.type == 'bool'">
                  <label><input type="radio" name="${option.name}" value="true" checked="${option.value == 'true' or None}" /> true</label>
                  <label><input type="radio" name="${option.name}" value="false" checked="${option.value == 'false' or None}" /> false</label>
                </div>
                <div class="text" py:otherwise="">
                  <input type="text" name="${option.name}" value="${option.value}" />
                </div>
              </py:choose>
              <div class="help">
                ${option.doc}
              </div>
            </fieldset>
          </li>
        </ul>
        <div class="ini buttons">
          <input type="submit" value="Apply changes" />
        </div>
      </form>
    </div>
  </body>
</html>
