<!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:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:i18n="http://genshi.edgewall.org/i18n"
      i18n:domain="acct_mgr">
  <xi:include href="layout.html" />
  <?python
    if _dgettext is not None:
        dgettext = _dgettext ?>
  <head>
    <title>Reset Password</title>
    <script type="text/javascript">
    jQuery(document).ready(function($) {
        $('input[@name=username]')[0].focus();
    });
    </script>
  </head>

  <body>
    <div id="content" class="register">
      <h1>Reset Password</h1>

      <py:choose>
      <div class="system-message" py:when="reset.logged_in">
        <h2>Already logged in</h2>
        <p i18n:msg="">You're already logged in. If you need to change
          your password please use the
          <a href="${href.prefs('account')}">Account Preferences</a> page.
        </p>
      </div>

      <p py:when="reset.sent_to_email" i18n:msg="email">A new password
        has been emailed to you at ${reset.sent_to_email} .
      </p>

      <py:otherwise>
      <p>If you've forgotten your password, enter your username and
        email address below and you'll be emailed a new password.
      </p>

      <div class="system-message" py:if="reset.error">
        <h2>Error</h2>
        <p>$reset.error</p>
      </div>

      <p py:if="reset.message">$reset.message</p>

      <form method="post" id="acctmgr_passwd_reset" action="">
        <div>
          <label>Username:
            <input type="text" name="username" class="textwidget" size="20" />
          </label>
        </div>
        <div>
          <label>Email Address:
            <input type="text" name="email" class="textwidget" size="20" />
          </label>
        </div>
        <div class="buttons">
          <input type="submit"
                 value="${dgettext('acct_mgr', 'Reset password')}" />
        </div>
      </form>
      </py:otherwise>
      </py:choose>
    </div>
  </body>
</html>
