{% extends "base_with_margins.html" %}
{% block title %} | Login {% endblock %}
{% block content %}
    <div class="row">
        <div class="well col-md-6 col-md-offset-3">
            <form role="form" method="POST">
                {% csrf_token %}
                {{ form.non_field_errors }}
                {% if form.username.errors %}
                    <div class="form-group has-error has-feedback">
                {% else %}
                    <div class="form-group">
                {% endif %}
                    <label for="id_username">Username:</label>
                    <input type="text" class="form-control" id="id_username" name="username" placeholder="Enter username">
                    {% if form.username.errors %}
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span>
                        <span class="help-block">{{form.username.errors}}</span>
                    {% endif %}
                </div>
                {% if form.password.errors %}
                    <div class="form-group has-error has-feedback">
                {% else %}
                    <div class="form-group">
                {% endif %}
                    <label for="id_password">Password</label>
                    <input type="password" class="form-control" id="id_password" name="password" placeholder="Password">
                    {% if form.password.errors %}
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span>
                        <span class="help-block">{{form.password.errors}}</span>
                    {% endif %}
                </div>
                <button type="submit" class="btn btn-default">Submit</button>
            </form>
        </div>
    </div>
{% endblock %}
