<!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>${_('Logging')}</title>
    <script type="text/javascript">/*<![CDATA[*/
      jQuery(document).ready(function($) {
        $("#log_type").change(function() {
          $("#log_level").enable(this.selectedIndex > 0);
          $("#log_file").enable(this.options[this.selectedIndex].value == "file");
        }).change();
      });
    /*]]>*/</script>
  </head>

  <body>
    <h2>${_('Logging')}</h2>

    <form class="mod" id="modlog" method="post" action="">
      <fieldset>
        <legend>${_('Configuration')}</legend>
        <div class="field">
          <label>${_('Log type')}:<br /> <!--! resolve conflicts with 'Type' -->
            <select id="log_type" name="log_type">
              <option py:for="type in log.types" value="${type.name}"
                      selected="${type.selected or None}"
                      disabled="${type.disabled or None}">${type.label}</option>
            </select>
          </label>
        </div>
        <div class="field">
          <label>${_('Log level')}:<br />
            <select id="log_level" name="log_level">
              <option py:for="level in log.levels"
                      selected="${level==log.level or None}">$level</option>
            </select>
          </label>
        </div>
        <div class="field">
          <label>${_('Log file')}:<br />
            <input type="text" id="log_file" name="log_file" size="48" value="$log.file"/>
          </label>
          <p class="help">
            <!--! FIXME: message_contains_tag --> 
            相対パスを指定した場合、ログファイルはプロジェクトの環境の
            <code>log</code> ディレクトリ (<code>$log.dir</code>) に保存されます。
          </p>
        </div>
        <div class="buttons">
          <input type="submit" value="${_('Apply changes')}"/>
        </div>
      </fieldset>
    </form>
  </body>

</html>
