Eww, hard to sum up…
- Update django-allauth-cas to the last version. - Add docs (README, example/README). - Add tests for Clipper provider. - Add tests to check templates do not contain syntax error. - Add the last missing templates to override all allauth's displayable templates. - Improve stylesheets.
This commit is contained in:
parent
4cdbb049df
commit
fe21f9c6af
58 changed files with 1304 additions and 4566 deletions
18
allauth_ens/templates/account/account_inactive.html
Normal file
18
allauth_ens/templates/account/account_inactive.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% extends "allauth_ens/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block header-title %}{% trans "Account Inactive" %}{% endblock %}
|
||||
{% block title %}{% trans "Account Inactive" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<section>
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
This account is inactive.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
|
@ -1,29 +0,0 @@
|
|||
{% load widget_tweaks %}
|
||||
|
||||
{% csrf_token %}
|
||||
<ul class="input-list">
|
||||
{% for field in form %}
|
||||
{% with field|field_type as type %}
|
||||
<li class="input-wrapper {% if type == "booleanfield" %}input-skip{% endif %}">
|
||||
{% if type == "booleanfield" %}
|
||||
<label for="{{ field.id_for_label }}">
|
||||
{{ field.label }}
|
||||
{% render_field field class+="field" %}
|
||||
</label>
|
||||
{% else %}
|
||||
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||
{% render_field field class+="field" autocomplete="off" autocapitalize="none" placeholder="" %}
|
||||
{% endif %}
|
||||
<div class="infos-spacer"></div>
|
||||
<ul class="messages">
|
||||
{% if field.help_text %}
|
||||
<li>{{ field.help_text|safe }}</li>
|
||||
{% endif %}
|
||||
{% for error in field.errors %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</ul>
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/base.html" %}
|
||||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "E-mail Addresses" %}{% endblock %}
|
||||
|
@ -97,7 +97,7 @@
|
|||
{% endif %}
|
||||
|
||||
<form action="{% url "account_email" %}" method="post" class="form-inline">
|
||||
{% include "account/block-form.html" with form=form %}
|
||||
{% include "allauth_ens/block-form.html" with form=form %}
|
||||
<button type="submit" class="link" name="action_add">{% trans "Add E-mail" %}</button>
|
||||
</form>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/base.html" %}
|
||||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load account %}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/base.html" %}
|
||||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load account socialaccount allauth_ens %}
|
||||
|
||||
|
@ -7,25 +7,26 @@
|
|||
|
||||
{% block messages-extra %}
|
||||
{% if form.errors or user.is_authenticated %}
|
||||
<div class="messages-container">
|
||||
<ul class="messages-list">
|
||||
{% if form.errors %}
|
||||
<li class="message error">
|
||||
{% blocktrans %}
|
||||
Authentication failed. Please check your credentials and try again.
|
||||
{% endblocktrans %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<li class="message warning">
|
||||
{% blocktrans %}
|
||||
You are unauthorized to view this page. Please sign in with an account
|
||||
with the required permissions.
|
||||
{% endblocktrans %}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="messages-container">
|
||||
<ul class="messages-list">
|
||||
{% if form.errors %}
|
||||
<li class="message error">
|
||||
{% blocktrans %}
|
||||
Authentication failed. Please check your credentials and try again.
|
||||
{% endblocktrans %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<li class="message warning">
|
||||
{% user_display user as user_str %}
|
||||
{% blocktrans %}
|
||||
Your are authenticated as {{ user_str }}, but are not authorized to access
|
||||
this page. Would you like to login to a different account ?
|
||||
{% endblocktrans %}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -34,31 +35,32 @@
|
|||
{% get_providers as socialaccount_providers %}
|
||||
|
||||
{% if socialaccount_providers %}
|
||||
<section>
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
Please sign in with one of your existing third party accounts, or with the
|
||||
form opposite.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<section id="providers">
|
||||
<ul class="method-list">
|
||||
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
|
||||
</ul>
|
||||
{% include "socialaccount/snippets/login_extra.html" %}
|
||||
</section>
|
||||
|
||||
{% include "socialaccount/snippets/login_extra.html" %}
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<section>
|
||||
<section id="main">
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
Please sign in with one of your existing third party accounts, or with the form below.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<ul class="actions">
|
||||
<li><a href="{{ signup_url }}">{% trans "Sign Up" %}</a></li>
|
||||
<li><a href="{% url "account_reset_password" %}">{% trans "Forgot Password?" %}</a>
|
||||
{% is_open_for_signup as open_signup %}
|
||||
{% if open_signup %}
|
||||
<li><a href="{{ signup_url }}">{% trans "Sign Up" %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<form action="{% url "account_login" %}" method="post">
|
||||
{% include "account/block-form.html" with form=form %}
|
||||
{% include "allauth_ens/block-form.html" with form=form %}
|
||||
<input type="submit" value="{% trans "Sign In" %}">
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/base.html" %}
|
||||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Sign Out" %}{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/base.html" %}
|
||||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Change Password" %}{% endblock %}
|
||||
|
@ -6,7 +6,7 @@
|
|||
|
||||
{% block messages-extra %}
|
||||
|
||||
{% include "account/block-messages-form-errors.html" with form_errors=form.non_field_errors %}
|
||||
{% include "allauth_ens/block-messages-form-errors.html" with form_errors=form.non_field_errors %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
|||
|
||||
<section>
|
||||
<form action="{% url "account_change_password" %}" method="post">
|
||||
{% include "account/block-form.html" with form=form submit_value=submit_value %}
|
||||
{% include "allauth_ens/block-form.html" with form=form submit_value=submit_value %}
|
||||
<input type="submit" value="{% trans "Change Password" %}">
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/base.html" %}
|
||||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Password Reset" %}{% endblock %}
|
||||
|
@ -14,7 +14,7 @@
|
|||
{% endblocktrans %}
|
||||
</p>
|
||||
<form action="{% url "account_reset_password" %}" method="post">
|
||||
{% include "account/block-form.html" with form=form %}
|
||||
{% include "allauth_ens/block-form.html" with form=form %}
|
||||
<input type="submit" value="{% trans "Reset Password" %}">
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/base.html" %}
|
||||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Password Reset" %}{% endblock %}
|
||||
|
|
28
allauth_ens/templates/account/password_reset_from_key.html
Normal file
28
allauth_ens/templates/account/password_reset_from_key.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Change Password" %}{% endblock %}
|
||||
{% block header-title %}{% trans "Change Password" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<section>
|
||||
{% if token_fail %}
|
||||
<p>
|
||||
{% url 'account_reset_password' as passwd_reset_url %}
|
||||
{% blocktrans %}
|
||||
The password reset link was invalid, possibly because it has already been used.
|
||||
Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% elif form %}
|
||||
<form action="" method="post">
|
||||
{% include "allauth_ens/block-form.html" with form=form %}
|
||||
<input type="submit" value="{% trans "Reset Password" %}">
|
||||
</form>
|
||||
{% else %}
|
||||
<p>{% trans "Your password is now changed." %}</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/base.html" %}
|
||||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Change Password" %}{% endblock %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/base.html" %}
|
||||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Set Password" %}{% endblock %}
|
||||
|
@ -6,7 +6,7 @@
|
|||
|
||||
{% block messages-extra %}
|
||||
|
||||
{% include "account/block-messages-form-errors.html" with form_errors=form.non_field_errors %}
|
||||
{% include "allauth_ens/block-messages-form-errors.html" with form_errors=form.non_field_errors %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
@ -19,9 +19,8 @@
|
|||
third parties.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<hr>
|
||||
<form action="{% url "account_set_password" %}" method="post">
|
||||
{% include "account/block-form.html" with form=form %}
|
||||
{% include "allauth_ens/block-form.html" with form=form %}
|
||||
<input type="submit" value="{% trans "Set Password" %}">
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/base.html" %}
|
||||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Signup" %}{% endblock %}
|
||||
|
@ -13,7 +13,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
<form action="{% url "account_signup" %}" method="post">
|
||||
{% include "account/block-form.html" with form=form %}
|
||||
{% include "allauth_ens/block-form.html" with form=form %}
|
||||
<input type="submit" value="{% trans "Sign Up" %}">
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/base.html" %}
|
||||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Sign Up Closed" %}{% endblock %}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>{% block title %}{% endblock %}{% if request.site.name %} - {{ request.site.name }}{% endif %}</title>
|
||||
<title>{% block title %}{% endblock %}{% if request.site.name %} · {{ request.site.name }}{% endif %}</title>
|
||||
|
||||
{# Responsive UI #}
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
@ -17,6 +17,10 @@
|
|||
{# CSS #}
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Roboto:400,700|Roboto+Slab:400">
|
||||
<link rel="stylesheet"
|
||||
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
|
||||
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN"
|
||||
crossorigin="anonymous">
|
||||
<link rel="stylesheet"
|
||||
href="{% static "allauth_ens/screen.css" %}">
|
||||
|
||||
|
@ -44,10 +48,10 @@
|
|||
{% get_home_url as home_url %}
|
||||
{% if home_url %}
|
||||
<a href="{{ home_url }}">
|
||||
{{ request.site.name|default:"Voir le site" }}
|
||||
{{ request.site.name|default:"View site" }}
|
||||
</a>
|
||||
{% else %}
|
||||
<span>{{ request.site.name }}</span>
|
||||
<span>{{ request.site.name|default:"View site" }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
@ -66,16 +70,16 @@
|
|||
</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span>
|
||||
<i class="fa fa-user"></i>
|
||||
<a href="{% url "account_login" %}">
|
||||
<i class="fa fa-sign-in"></i>
|
||||
{% trans "Not Connected" %}
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{% include "account/block-messages.html" %}
|
||||
{% include "allauth_ens/block-messages.html" %}
|
||||
|
||||
{% block messages-extra %}{% endblock %}
|
||||
|
33
allauth_ens/templates/allauth_ens/block-form.html
Normal file
33
allauth_ens/templates/allauth_ens/block-form.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
{% load widget_tweaks %}
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
{% for field in form %}
|
||||
{% with widget=field|widget_type %}
|
||||
{% if widget == "checkboxinput" %}
|
||||
<div li class="input-wrapper input-skip {% if field.errors %}input-error{% endif %}">
|
||||
<label for="{{ field.id_for_label }}">
|
||||
{{ field.label }}
|
||||
<div class="widget-checkbox">
|
||||
{% render_field field class+="field" %}
|
||||
<button type="button" class="choice-yes">Oui</button>
|
||||
<button type="button" class="choice-no focus">Non</button>
|
||||
</div>
|
||||
</label>
|
||||
{% else %}
|
||||
<div class="input-wrapper{% if field.errors %} input-error{% endif %}">
|
||||
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||
{% render_field field class+="field" size="" autocomplete="off" autocapitalize="none" placeholder="" %}
|
||||
{% endif %}
|
||||
<div class="infos-spacer"></div>
|
||||
<ul class="messages">
|
||||
{% if field.help_text %}
|
||||
<li>{{ field.help_text|safe }}</li>
|
||||
{% endif %}
|
||||
{% for error in field.errors %}
|
||||
<li class="error-desc">{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/block-messages-base.html" %}
|
||||
{% extends "allauth_ens/block-messages-base.html" %}
|
||||
|
||||
{% block messages-container %}
|
||||
{% if form_errors %}{{ block.super }}{% endif %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/block-messages-base.html" %}
|
||||
{% extends "allauth_ens/block-messages-base.html" %}
|
||||
|
||||
{% block messages-container %}
|
||||
{% if messages %}{{ block.super }}{% endif %}
|
|
@ -0,0 +1,17 @@
|
|||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Login Failure" %}{% endblock %}
|
||||
{% block header-title %}{% trans "Login Failure" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<section>
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
An error occured while attempting to login via your social network account.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "account/base.html" %}
|
||||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load socialaccount allauth_ens_social %}
|
||||
|
||||
|
@ -19,48 +19,45 @@
|
|||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<ul class="provider-list">
|
||||
<ul class="connections-providers-list">
|
||||
{% get_accounts_by_providers user as accounts_by_providers %}
|
||||
|
||||
{% for provider, accounts in accounts_by_providers.items %}
|
||||
|
||||
<li class="provider">
|
||||
<ul class="heading">
|
||||
<li class="connect">
|
||||
<a href="{% provider_login_url provider.id process="connect" scope=scope auth_params=auth_params %}">
|
||||
<i class="fa fa-plus"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="name">
|
||||
{{ provider.name }}
|
||||
</li>
|
||||
</ul>
|
||||
<li>
|
||||
<div class="heading">
|
||||
<a class="connect" href="{% provider_login_url provider.id process="connect" scope=scope auth_params=auth_params %}">
|
||||
<i class="fa fa-plus"></i>
|
||||
</a>
|
||||
{{ provider.name }}
|
||||
</div>
|
||||
|
||||
{% if accounts %}
|
||||
|
||||
<ul class="connected-list">
|
||||
<ul class="connections-list">
|
||||
{% for account in accounts %}
|
||||
|
||||
<li>
|
||||
<span class="connected-delete">
|
||||
<div class="delete">
|
||||
<form action="{% url "socialaccount_connections" %}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="account" value="{{ account.id }}">
|
||||
<button type="submit" class="link"><i class="fa fa-remove"></i></button>
|
||||
<button type="submit" class="link">
|
||||
<i class="fa fa-remove"></i>
|
||||
</button>
|
||||
</form>
|
||||
</span>
|
||||
<span class="connected-label">
|
||||
<i class="fa fa-user"></i>
|
||||
{% with account.get_profile_url as profile_url %}
|
||||
{% trans "Connected Account - No ID" as fallback_label %}
|
||||
{% firstof account.extra_data.name account.extra_data.username fallback_label as account_label %}
|
||||
{% if profile_url %}
|
||||
<a href="{{ profile_url }}" target="blank">{{ account_label }}</a>
|
||||
{% else %}
|
||||
</div>
|
||||
<i class="fa fa-user"></i>
|
||||
{% with profile_urlaccount.get_profile_url as profile_url %}
|
||||
{% firstof account.extra_data.name account.extra_data.username account.uid as account_label %}
|
||||
{% if profile_url %}
|
||||
<a href="{{ get_profile_url }}" target="blank">
|
||||
{{ account_label }}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</span>
|
||||
</a>
|
||||
{% else %}
|
||||
{{ account_label }}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</li>
|
||||
|
||||
{% endfor %}
|
||||
|
|
19
allauth_ens/templates/socialaccount/login_cancelled.html
Normal file
19
allauth_ens/templates/socialaccount/login_cancelled.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Login Cancelled" %}{% endblock %}
|
||||
{% block header-title %}{% trans "Login Cancelled" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<section>
|
||||
<p>
|
||||
{% url "account_login" as login_url %}
|
||||
|
||||
{% blocktrans %}
|
||||
You decided to cancel logging into our site using one of your existing accounts. If this was a mistake, please proceed to <a href="{{login_url}}">sign in</a>.{% endblocktrans %}
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
26
allauth_ens/templates/socialaccount/signup.html
Normal file
26
allauth_ens/templates/socialaccount/signup.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
{% extends "allauth_ens/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Signup" %}{% endblock %}
|
||||
{% block header-title %}{% trans "Signup" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<section>
|
||||
<p>
|
||||
{% blocktrans with provider_name=account.get_provider.name %}
|
||||
You are about to use your {{ provider_name }} account to login.
|
||||
As a final step, please complete the following form:
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<form action="{% url "socialaccount_signup" %}" method="post">
|
||||
{% include "allauth_ens/block-form.html" with form=form %}
|
||||
<input type="submit" value="{% trans "Sign Up" %}">
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}">
|
||||
{% endif %}
|
||||
</form>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue