<!--!  Copyright (C) 2006-2014 Edgewall Software

  This software is licensed as described in the file COPYING, which
  you should have received as part of this distribution. The terms
  are also available at http://trac.edgewall.com/license.html.

  This software consists of voluntary contributions made by many
  individuals. For the exact contribution history, see the revision
  history and logs, available at http://trac.edgewall.org/.
-->
<!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:i18n="http://genshi.edgewall.org/i18n"
      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>Type:<br />
            <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" i18n:msg="dir">
            If you specify a relative path, the log file will be stored inside the
            <code>log</code> directory of the project environment (<code>$log.dir</code>).
          </p>
        </div>
      </fieldset>
      <div class="buttons">
        <input type="submit" value="${_('Apply changes')}"/>
      </div>
    </form>
  </body>

</html>
