<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>Quintet</title>

    <!-- Bootstrap -->
    <link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.min.js"></script>
      <script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <nav class="navbar navbar-default navbar-static-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <a class="navbar-brand" href="{% url 'dashboard' %}">Quintet</a>
        </div>
      </div>
    </nav>

    <div class="container" style="padding-top: 15px;">
      {% block content %}
      <div class="row">
        <div class="col-sm-6 col-sm-offset-3">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">Login</h3>
            </div>
            <div class="panel-body">
              <form method="post" action="{% url 'django.contrib.auth.views.login' %}">{% csrf_token %}
                {% if form.errors %}
                <p class="text-danger">Your username and password didn't match. Please try again.</p>
                {% endif %}
                <div class="form-group">
                  {{ form.username.label_tag }}
                  {{ form.username }}
                </div>
                <div class="form-group">
                  {{ form.password.label_tag }}
                  {{ form.password }}
                </div>
                <a class="text-muted" href="{% url 'password_reset' %}">Forgot password?</a>
                <button type="submit" class="btn btn-primary pull-right">Login</button>
                <input type="hidden" name="next" value="{{ next }}" />
              </form>
            </div>
          </div>
        </div>
        {% endblock %}
      </div>
    </div>

    <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/js/bootstrap.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
      $('input').addClass('form-control');
    })
    </script>
    {% block js %}{% endblock %}
  </body>
</html>
