{% extends "site_base.html" %}

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

{% block metas %}
    <title>{{ _('Sign in') }} - {{ settings.SITE_TITLE }}</title>
{% endblock %}

{% block breadcrumbs %}
{% endblock %}

{% block content %}
<section id="forum">
  {% include "rforum/elements/forum-top.html" %}

  <ul class="breadcrumb">
	<li><i class="icon-user"></i> {{ _('Login') }}</li>
  </ul>

  {% if not user.is_authenticated %}

  {% if socialaccount.providers  %}
  <p>{% blocktrans with site.name as site_name %}Please sign in with one
	of your existing third party accounts. Or, <a 
												  href="{{ signup_url }}">sign up</a> for a {{site_name}} account and sign in
	below:{% endblocktrans %}</p>

  <div class="socialaccount_ballot">

	<ul class="socialaccount_providers">
	  {% include "socialaccount/snippets/provider_list.html" %}
	</ul>

	<div class="login-or">{% trans 'or' %}</div>

  </div>

  {% include "socialaccount/snippets/login_extra.html" %}

  {% endif %}
  {% endif %}

  <div class="offset3">
	<form class="login form-horizontal" method="POST" action="{% url 'account_login' %}">
	  {% csrf_token %}
	  {{ form.as_p }}
	  {% if redirect_field_value %}
	  <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
	  {% endif %}
	  <a class="btn" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
	  <button class="btn btn-info" type="submit">{% trans "Sign In" %}</button>
	</form>
  </div>

  {% if user.is_authenticated %}
  {% include "account/snippets/already_logged_in.html" %}
  {% endif %}


</section>
{% endblock %}

