ejplatform/ej-server

View on GitHub
src/ej_users/jinja2/account/allauth/login.jinja2

Summary

Maintainability
Test Coverage
{% extends "account/base.html" %}

{% load static i18n %}
{% load account socialaccount %}
{% load crispy_forms_tags %}

{% block head_title %}{% trans "Sign In" %}{% endblock %}

{% block css %}
  {{ block.super }}

  <link href="{% static 'css/embed.css' %}" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/gh/lipis/bootstrap-social@5.1.1/bootstrap-social.css" rel="stylesheet">
  <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

{% endblock css %}

{% block javascript %}
  {{ block.super }}

  <script src="{% static 'js/twtterLoginWidget.js' %}"></script>
  {% providers_media_js %}

{% endblock javascript %}

{% block inner %}

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

  <a id="facebook-button" class="btn btn-primary btn-block btn-social btn-facebook"
     href="{% provider_login_url "facebook" method="js_sdk" next="/conversations/" %}"
     style="color: #fff"><i class="fa fa-facebook"></i>{{ _('Connect with Facebook') }}</a>
  <a id="twitter-login-link"
     class="btn btn-primary btn-block btn-social btn-twitter"
     href="{% provider_login_url "twitter" next="/conversations/" %}"
     style="color: #fff;">
    <i class="fa fa-twitter"></i>{{ _('Connect with Twitter') }}</a>
  <a id="github-login-link"
     class="btn btn-primary btn-block btn-social btn-github"
     href="{% provider_login_url "github" next="/conversations/" %}"
     style="color: #fff;">
    <i class="fa fa-twitter"></i>{{ _('Connect with Github') }}</a>
  <a id="google-login-link"
     class="btn btn-primary btn-block btn-social btn-google"
     href="{% provider_login_url "google" next="/conversations/" %}"
     style="color: #fff;">
    <i class="fa fa-twitter"></i>{{ _('Connect with Google') }}</a>


  <form class="login" method="POST" action="{% url 'account_login' %}">
    {% csrf_token %}
    <!-- form | crispy decorator not working -->
    {{ form }}
    {% if redirect_field_value %}
      <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
    {% endif %}
    <a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
    <button class="primaryAction btn btn-primary" type="submit">{% trans "Sign In" %}</button>
  </form>

  <a class="btn btn-primary btn-block" href="{% url 'account_signup' %}"
     style="color: #fff"><i class=""></i>{{ _('Register') }}</a>

{% endblock %}