<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
  <head>
    <link href="/css/index.css" rel="stylesheet" type="text/css">
    <title>Login Needed FanFicFare</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div id='main'>
      <h1>
        <a href="/" style="text-decoration: none; color: black;">FanFicFare</a>
      </h1>

      {% if fic.failure %}
      <div id='error'>
        {{ fic.failure }}
      </div>
      {% endif %}
      <form action="/fdown" method="post">
        <input type="hidden" name="url" value='{{ url }}'>
        <input type="hidden" name="format" value='{{ format }}'>
        <div class="borderbox">

          {% if is_login %}

              {% if is_passwdonly %}
                   <h3>Password</h3>
                   <div class="borderbox">
                     {{ site }} requires a Password for this story.<br>
                     You need to provide the Password for this story
                     to download it.
                   </div>
              {% else %}
                   <h3>Login / Password</h3>
                   <div class="borderbox">
                     {{ site }} requires a Login/Password for this story.<br>
                     You need to provide your Login/Password for {{ site }}
                     to download it.
                   </div>
                   <div class='fieldandlabel'>
                     <div class='label'>Login</div>
                     <div class='field'><input type='text' name='login' size='50'></div>
                   </div>
              {% endif %}
          <div class='fieldandlabel'>
             <div class='label'>Password</div>
             <div class='field'><input type='password' name='password' size='50'></div>
          </div>

               {% else %}

          <input type="hidden" name="login" value='{{ login }}'>
          <input type="hidden" name="password" value='{{ password }}'>
          <div class='fieldandlabel'>
            <div class='label'>Are you an Adult?  <input type='checkbox' name='is_adult'></div>
          </div>

          {% endif %}

        </div>

        <div id='submitbtn'>
          <input type="submit" value="Download">
        </div>
      </form>

      <div style='text-align: center'>
        <img src="http://code.google.com/appengine/images/appengine-silver-120x30.gif"
             alt="Powered by Google App Engine" />
        <br/><br/>
        This is a web front-end to <a href="https://github.com/JimmXinu/FanFicFare/">FanFicFare</a><br/>
        Copyright &copy; FanFicFare team
      </div>

    </div>
  </body>
</html>
