{% extends 'base.html' %}

{% load i18n %}
{% load account %}
{% load url from future %}

{% block head_title %}{% trans "Login" %}{% endblock %}
{% block breadcrumb_title %}{% trans "Login" %}{% endblock %}

{% block content %}

    <div class="login-container login-layout">
    <div class="row-fluid">
    <div class="position-relative">
    <div id="login-box" class="login-box visible widget-box no-border">
        <div class="widget-body">
            <div class="widget-main">
                <h4 class="header blue lighter bigger">
                    <i class="icon-coffee green"></i>
                    Please Enter Your Information
                </h4>

                <div class="space-6"></div>

                <form class="login" method="POST" action="{% url 'account_login' %}">
                    {% csrf_token %}
                    <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
                    <fieldset>
                        <label>
                            <span class="block input-icon input-icon-right">
                                <input type="text" class="span12"
                                       placeholder="Username"
                                       id="id_login"
                                       name="login"/>
                                <i class="icon-user"></i>
                            </span>
                        </label>
                        <label>
                            <span class="block input-icon input-icon-right">
                                <input id="id_password" class="span12" name="password" placeholder="Password" type="password">
                                <i class="icon-lock"></i>
                            </span>
                        </label>
                        <div class="space"></div>
                        <div class="clearfix">
                            <label class="inline">
                                <input type="checkbox" class="ace"/>
                                <span class="lbl"> Remember Me</span>
                            </label>
                            <button type="submit"
                                    class="width-35 pull-right btn btn-small btn-primary">
                                <i class="icon-key"></i>
                                Login
                            </button>
                        </div>
                        <div class="space-4"></div>
                    </fieldset>
                </form>
                <div class="social-or-login center">
                    <span class="bigger-110">Or Login Using</span>
                </div>
                <div class="social-login center">
                    <a class="btn btn-primary" href="/accounts/facebook/login/?process=login">
                        <i class="icon-facebook"></i>
                    </a>
                    <a class="btn btn-info" href="/accounts/twitter/login/?process=login">
                        <i class="icon-twitter"></i>
                    </a>
                    <a class="btn btn-danger"  href="/accounts/google/login/?process=login">
                        <i class="icon-google-plus"></i>
                    </a>
                </div>
            </div>
            <!--/widget-main-->
            <div class="toolbar clearfix">
                <div>
                    <a href="#" onclick="show_box('forgot-box'); return false;" class="forgot-password-link">
                        <i class="icon-arrow-left"></i>
                        I forgot my password
                    </a>
                </div>
                <div>
                    <a href="#" onclick="show_box('signup-box'); return false;" class="user-signup-link">
                        I want to register
                        <i class="icon-arrow-right"></i>
                    </a>
                </div>
            </div>
        </div>
        <!--/widget-body-->
    </div>
    <!--/login-box-->

    <div id="forgot-box" class="forgot-box widget-box no-border">
        <div class="widget-body">
            <div class="widget-main">
                <h4 class="header red lighter bigger">
                    <i class="icon-key"></i>
                    Retrieve Password
                </h4>

                <div class="space-6"></div>
                <p>
                    Enter your email and to receive instructions
                </p>

                <form>
                    <fieldset>
                        <label>
                            <span class="block input-icon input-icon-right">
                                <input type="email" class="span12" placeholder="Email"/>
                                <i class="icon-envelope"></i>
                            </span>
                        </label>
                        <div class="clearfix">
                            <button onclick="return false;"
                                    class="width-35 pull-right btn btn-small btn-danger">
                                <i class="icon-lightbulb"></i>
                                Send Me!
                            </button>
                        </div>
                    </fieldset>
                </form>
            </div>
            <!--/widget-main-->
            <div class="toolbar center">
                <a href="#" onclick="show_box('login-box'); return false;" class="back-to-login-link">
                    Back to login
                    <i class="icon-arrow-right"></i>
                </a>
            </div>
        </div>
        <!--/widget-body-->
    </div>
    <!--/forgot-box-->
    <div id="signup-box" class="signup-box widget-box no-border">
        <div class="widget-body">
            <div class="widget-main">
                <h4 class="header green lighter bigger">
                    <i class="icon-group blue"></i>
                    New User Registration
                </h4>

                <div class="space-6"></div>
                <p> Enter your details to begin: </p>

                <form>
                    <fieldset>
                        <label>
                            <span class="block input-icon input-icon-right">
                                <input type="email" class="span12" placeholder="Email"/>
                                <i class="icon-envelope"></i>
                            </span>
                        </label>
                        <label>
                            <span class="block input-icon input-icon-right">
                                <input type="text" class="span12"
                                       placeholder="Username"/>
                                <i class="icon-user"></i>
                            </span>
                        </label>
                        <label>
                            <span class="block input-icon input-icon-right">
                                <input type="password" class="span12"
                                       placeholder="Password"/>
                                <i class="icon-lock"></i>
                            </span>
                        </label>
                        <label>
                            <span class="block input-icon input-icon-right">
                                <input type="password" class="span12"
                                       placeholder="Repeat password"/>
                                <i class="icon-retweet"></i>
                            </span>
                        </label>
                        <label>
                            <input type="checkbox" class="ace"/>
                            <span class="lbl">
                                I accept the
                                <a href="#">User Agreement</a>
                            </span>
                        </label>
                        <div class="space-24"></div>
                        <div class="clearfix">
                            <button type="reset" class="width-30 pull-left btn btn-small">
                                <i class="icon-refresh"></i>
                                Reset
                            </button>
                            <button onclick="return false;"
                                    class="width-65 pull-right btn btn-small btn-success">
                                Register
                                <i class="icon-arrow-right icon-on-right"></i>
                            </button>
                        </div>
                    </fieldset>
                </form>
            </div>
            <div class="toolbar center">
                <a href="#" onclick="show_box('login-box'); return false;" class="back-to-login-link">
                    <i class="icon-arrow-left"></i>
                    Back to login
                </a>
            </div>
        </div>
        <!--/widget-body-->
    </div>
    <!--/signup-box-->
    </div>
    <!--/position-relative-->
    </div>
    </div>
{% endblock %}
{% block footer_scripts %}
    <script type="text/javascript">
        function show_box(id) {
            jQuery('.widget-box.visible').removeClass('visible');
            jQuery('#' + id).addClass('visible');
        }
    </script>
{% endblock %}
