<!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">
  <xi:include href="layout.html" />
  <head>
    <title>Reset Password</title>
    <script type="text/javascript">
    $(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>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">A new password has been emailed to you at
      ${reset.sent_to_email}.</p>

      <py:otherwise>
      <p>If you've forgot 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" 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>
        <input type="submit" value="Reset password" />
      </form>
      </py:otherwise>
      </py:choose>
    </div>
  </body>
</html>
