{% extends "base.html" %}
{% load static %}

{% block title %}Anmelden{% endblock %}

{% block content %}
<div class="row">
  <div class="col-md-4 col-md-offset-4">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title">Anmelden</h3>
      </div>
      <div class="panel-body">
        <form method="post">
          {% csrf_token %}
          
          {% if form.errors %}
            <div class="alert alert-danger">
              <p>Ihr Benutzername und Passwort stimmen nicht überein. Bitte versuchen Sie es erneut.</p>
            </div>
          {% endif %}
          
          <div class="form-group">
            <label for="id_username">Benutzername:</label>
            <input type="text" name="username" class="form-control" id="id_username" required autofocus>
          </div>
          
          <div class="form-group">
            <label for="id_password">Passwort:</label>
            <input type="password" name="password" class="form-control" id="id_password" required>
          </div>
          
          <div class="form-group">
            <button type="submit" class="btn btn-primary">Anmelden</button>
          </div>
          
          <input type="hidden" name="next" value="{{ next }}">
        </form>
      </div>
    </div>
  </div>
</div>
{% endblock %}