{% extends "money/base_registration.html" %}

{% block title %}Home{% endblock %}

{% block body_block %}
    {% if user.is_authenticated %}
        <h1> Hi ! {{ user }} ! You are already Logged in </h1>
        <h3>To Log-out please click <a href="/accounts/logout/">here</a></h3>
    {% else %}
        <div class="hero-unit">
            <h1>Login to Money</h1>

            <div class="container">
                <form class="form-signin span4" id="login_form" method="post" action="/accounts/login/">
                    <h2 class="form-signin-heading">Please sign in</h2>
                    {% csrf_token %}

                    {% if bad_details %}
                        <p><strong>Your username and/or password were incorrect!</strong></p>
                    {% elif disabled_account %}
                        <p><strong>Your Rango account is currently disabled; we can't log you in!</strong></p>
                    {% endif %}

                    Username: <input type="text" class="input-block-level" placeholder="Username" name="username"
                                     value="" size="50"/>
                    <br/>
                    Password: <input type="password" class="input-block-level" placeholder="Password" name="password"
                                     value="" size="50"/>
                    <br/>
                    <button class="btn btn-primary" type="submit">Sign in</button>
                </form>

            </div>
            <!-- /container -->
        </div>
    {% endif %}
{% endblock %}
