add templates for allauth

This commit is contained in:
Jan Dittberner 2015-01-17 23:08:41 +01:00
parent 7d6e0386d8
commit 92b6e8a8cb
44 changed files with 476 additions and 0 deletions

View file

@ -0,0 +1,9 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Account Inactive" %}{% endblock title %}
{% block page_title %}{% trans "Account Inactive" %}{% endblock page_title %}
{% block content %}
<p>{% trans "This account is inactive." %}</p>
{% endblock %}

View file

@ -0,0 +1 @@
{% extends "base.html" %}

View file

@ -0,0 +1,75 @@
{% extends "account/base.html" %}
{% load i18n crispy_forms_tags %}
{% block title %}{% trans "Account" %}{% endblock title %}
{% block page_title %}{% trans "E-mail Addresses" %}{% endblock page_title %}
{% block content %}
{% if user.emailaddress_set.all %}
<p>{% trans 'The following e-mail addresses are associated with your account:' %}</p>
<form action="{% url 'account_email' %}" class="email_list" method="post">
{% csrf_token %}
<table class="table table-condensed">
<thead>
<tr>
<th>{% trans "Email address" %}</th>
<th>{% trans "Verified" %}</th>
<th>{% trans "Primary" %}</th>
</tr>
</thead>
<tbody>
{% for emailaddress in user.emailaddress_set.all %}
<tr>
<td>{{ emailaddress.email }}</td>
<td>
{% if emailaddress.verified %}
<span class="verified">{% trans "Verified" %}</span>
{% else %}
<span class="unverified">{% trans "Unverified" %}</span>
{% endif %}
</td>
<td>
{% if emailaddress.primary %}
<span class="glyphicon glyphicon-star" title="{% trans "This is the current primary Email address" %}"></span>
{% else %}
<span class="glyphicon glyphicon-star-empty"></span>
{% endif %}
<input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{%endif %} value="{{emailaddress.email}}" />
</td>
</tr>
{% endfor %}
</tbody>
</table>
<p>
<button class="btn btn-default" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
<button class="btn btn-default" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
<button class="btn btn-warning" type="submit" name="action_remove" >{% trans 'Remove' %}</button>
</p>
</form>
{% else %}
<p class="text-warning"><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p>
{% endif %}
<h2>{% trans "Add E-mail Address" %}</h2>
<form method="post" action="{% url 'account_email' %}" class="add_email">
{% csrf_token %}
{{ form | crispy }}
<button name="action_add" type="submit" class="btn btn-primary">{% trans "Add E-mail" %}</button>
</form>
{% endblock content %}
{% block extra_js %}
<script type="text/javascript">
(function() {
var message = "{% trans 'Do you really want to remove the selected e-mail address?' %}";
var actions = document.getElementsByName('action_remove');
if (actions.length) {
actions[0].addEventListener("click", function(e) {
if (! confirm(message)) {
e.preventDefault();
}
});
}
})();
</script>
{% endblock extra_js %}

View file

@ -0,0 +1,4 @@
{% load account %}{% user_display user as user_display %}{% load i18n %}{% autoescape off %}{% blocktrans with current_site.name as site_name %}User {{ user_display }} at {{ site_name }} has given this as an email address.
To confirm this is correct, go to {{ activate_url }}
{% endblocktrans %}{% endautoescape %}

View file

@ -0,0 +1 @@
{% include "account/email/email_confirmation_message.txt" %}

View file

@ -0,0 +1 @@
{% include "account/email/email_confirmation_subject.txt" %}

View file

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Confirm E-mail Address{% endblocktrans %}
{% endautoescape %}

View file

@ -0,0 +1,8 @@
{% load i18n %}{% blocktrans with site.domain as site_domain %}You're receiving this e-mail because you or someone else has requested a password for your user account at {{site_domain}}.
It can be safely ignored if you did not request a password reset. Click the link below to reset your password.{% endblocktrans %}
{{ password_reset_url }}
{% if username %}{% blocktrans %}In case you forgot, your username is {{ username }}.{% endblocktrans %}
{% endif %}{% trans 'Thanks for using our site!' %}

View file

@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Password Reset E-mail{% endblocktrans %}
{% endautoescape %}

View file

@ -0,0 +1,18 @@
{% extends "account/base.html" %}
{% load account i18n %}
{% block title %}{{ block.super }} - {% trans "Confirm E-mail Address" %}{% endblock title %}
{% block page_title %}{% trans "Confirm E-Mail Address" %}{% endblock %}
{% block content %}
{% if confirmation %}
{% user_display confirmation.email_address.user as user_display %}
<p>{% blocktrans with confirmation.email_address.email as email %}Please confirm that <a href="mailto:{{email}}">{{ email }}</a> is an e-mail address for user {{ user_display }}.{% endblocktrans %}</p>
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
{% csrf_token %}
<button type="submit" class="btn btn-default">{% trans 'Confirm' %}</button>
</form>
{% else %}
{% url 'account_email' as email_url %}
<p>{% blocktrans %}This e-mail confirmation link expired or is invalid. Please <a href="{{ email_url}}">issue a new e-mail confirmation request</a>.{% endblocktrans %}</p>
{% endif %}
{% endblock content %}

View file

@ -0,0 +1,10 @@
{% extends "account/base.html" %}
{% load account i18n %}
{% block title %}{{ block.super }} - {% trans "Confirm E-mail Address" %}{% endblock title %}
{% block page_title %}{% trans "Confirm E-mail Address" %}{% endblock page_title %}
{% block content %}
{% user_display confirmation.email_address.user as user_display %}
<p>{% blocktrans with confirmation.email_address.email as email %}You have confirmed that <a href="mailto:{{email}}">{{ email }}</a> is an e-mail address for user {{ user_display }}.{% endblocktrans %}</p>
{% endblock content %}

View file

@ -0,0 +1,35 @@
{% extends "account/base.html" %}
{% load account crispy_forms_tags i18n %}
{% block title %}{{ block.super }} - {% trans "Sign In" %}{% endblock title %}
{% block page_title %}{% trans "Sign In" %}{% endblock page_title %}
{% block content %}
{% 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>
<ul class="list-inline">
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
</ul>
<p>{% trans 'or' %}</p>
{% else %}
<p>{% blocktrans %}If you have not created an account yet, then please
<a href="{{ signup_url }}">sign up</a> first.{% endblocktrans %}</p>
{% endif %}
<form class="login form" method="POST" action="{% url 'account_login' %}">
{% csrf_token %}
{{ form | crispy }}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<a class="btn btn-default" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
<button class="btn btn-primary" type="submit">{% trans "Sign In" %}</button>
</form>
{% endblock %}
{% block extra_js %}
{% include "socialaccount/snippets/login_extra.html" %}
{% endblock extra_js %}

View file

@ -0,0 +1,17 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Sign Out" %}{% endblock title %}
{% block page_title %}{% trans "Sign Out" %}{% endblock page_title %}
{% block content %}
<p>{% trans 'Are you sure you want to sign out?' %}</p>
<form method="post" action="{% url 'account_logout' %}">
{% csrf_token %}
{% if redirect_field_value %}
<input type="hidden" name="{{redirect_field_name}}" value="{{redirect_field_value}}"/>
{% endif %}
<button class="btn btn-primary" type="submit">{% trans 'Sign Out' %}</button>
</form>
{% endblock %}

View file

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}You cannot remove your primary e-mail address ({{email}}).{% endblocktrans %}

View file

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}Confirmation e-mail sent to {{email}}.{% endblocktrans %}

View file

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}You have confirmed {{email}}.{% endblocktrans %}

View file

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}Removed e-mail address {{email}}.{% endblocktrans %}

View file

@ -0,0 +1,4 @@
{% load account %}
{% load i18n %}
{% user_display user as name %}
{% blocktrans %}Successfully signed in as {{name}}.{% endblocktrans %}

View file

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}You have signed out.{% endblocktrans %}

View file

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}Password successfully changed.{% endblocktrans %}

View file

@ -0,0 +1,3 @@
{% load i18n %}
{% blocktrans %}Password successfully set.{% endblocktrans %}

View file

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}Primary e-mail address set.{% endblocktrans %}

View file

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}Your primary e-mail address must be verified.{% endblocktrans %}

View file

@ -0,0 +1,13 @@
{% extends "account/base.html" %}
{% load i18n crispy_forms_tags %}
{% block title %}{{ block.super }} - {% trans "Change Password" %}{% endblock title %}
{% block page_title %}{% trans "Change Password" %}{% endblock page_title %}
{% block content %}
<form method="POST" action="{% url 'account_change_password' %}" class="password_change">
{% csrf_token %}
{{ form | crispy }}
<button class="btn btn-primary" type="submit" name="action">{% trans "Change Password" %}</button>
</form>
{% endblock %}

View file

@ -0,0 +1,21 @@
{% extends "account/base.html" %}
{% load account i18n crispy_forms_tags %}
{% block title %}{{ block.super }} - {% trans "Password Reset" %}{% endblock title %}
{% block page_title %}{% trans "Password Reset" %}{% endblock page_title %}
{% block content %}
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p>
<form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
{% csrf_token %}
{{ form | crispy }}
<input class="btn btn-primary" type="submit" value="{% trans "Reset My Password" %}" />
</form>
<p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
{% endblock %}

View file

@ -0,0 +1,12 @@
{% extends "account/base.html" %}
{% load account i18n %}
{% block title %}{{ block.super }} - {% trans "Password Reset" %}{% endblock title %}
{% block page_title %}{% trans "Password Reset" %}{% endblocktrans page_title %}
{% block content %}
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
<p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
{% endblock %}

View file

@ -0,0 +1,21 @@
{% extends "account/base.html" %}
{% load i18n crispy_forms_tags %}
{% block title %}{{ block.super }} - {% trans "Change Password" %}{% endblock title %}
{% block page_title %}{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}{% endblock page_title %}
{% block content %}
{% if token_fail %}
{% url 'account_reset_password' as passwd_reset_url %}
<p>{% 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>
{% else %}
{% if form %}
<form method="POST" action=".">
{% csrf_token %}
{{ form | crispy }}
<input class="btn btn-primary" type="submit" name="action" value="{% trans "change password" %}"/>
</form>
{% else %}
<p>{% trans 'Your password is now changed.' %}</p>
{% endif %}
{% endif %}
{% endblock content %}

View file

@ -0,0 +1,8 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Change Password" %}{% endblock title %}
{% block page_title %}{% trans "Change Password" %}{% endblock page_title %}
{% block content %}
<p>{% trans 'Your password is now changed.' %}</p>
{% endblock %}

View file

@ -0,0 +1,13 @@
{% extends "account/base.html" %}
{% load i18n crispy_forms_tags %}
{% block title %}{{ block.super }} - {% trans "Set Password" %}{% endblock title %}
{% block page_title %}{% trans "Set Password" %}{% endblock page_title %}
{% block content %}
<form method="POST" action="{% url 'account_set_password' %}" class="password_set">
{% csrf_token %}
{{ form | crispy }}
<input class="btn btn-primary" type="submit" name="action" value="{% trans "Set Password" %}"/>
</form>
{% endblock %}

View file

@ -0,0 +1,19 @@
{% extends "account/base.html" %}
{% load i18n crispy_forms_tags %}
{% block title %}{{ block.super }} - {% trans "Signup" %}{% endblock title %}
{% block page_title %}{% trans "Sign Up" %}{% endblock page_title %}
{% block content %}
<p>{% blocktrans %}Already have an account? Then please <a href="{{ login_url }}">sign in</a>.{% endblocktrans %}</p>
<form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}">
{% csrf_token %}
{{ form | crispy }}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<button class="btn btn-primary" type="submit">{% trans "Sign Up" %} &raquo;</button>
</form>
{% endblock %}

View file

@ -0,0 +1,9 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Sign Up Closed" %}{% endblock title %}
{% block page_title %}{% trans "Sign Up Closed" %}{% endblock page_title %}
{% block content %}
<p>{% trans "We are sorry, but the sign up is currently closed." %}</p>
{% endblock %}

View file

@ -0,0 +1,4 @@
{% load account i18n %}
{% user_display user as user_display %}
<p><strong>{% trans "Note" %}:</strong> {% blocktrans %}you are already logged in as {{ user_display }}.{% endblocktrans %}</p>

View file

@ -0,0 +1,10 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Verify Your E-mail Address" %}{% endblock title %}
{% block page_title %}{% trans "Verify Your E-mail Address" %}{% endblock page_title %}
{% block content %}
<p>{% blocktrans %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
{% endblock %}

View file

@ -0,0 +1,18 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Verify Your E-mail Address" %}{% endblock title %}
{% block page_title %}{% trans "Verify Your E-mail Address" %}{% endblock %}
{% block content %}
{% url 'account_email' as email_url %}
<p>{% blocktrans %}This part of the site requires us to verify that
you are who you claim to be. For this purpose, we require that you
verify ownership of your e-mail address. {% endblocktrans %}</p>
<p>{% blocktrans %}We have sent an e-mail to you for
verification. Please click on the link inside this e-mail. Please
contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
<p>{% blocktrans %}<strong>Note:</strong> you can still <a href="{{email_url}}">change your e-mail address</a>.{% endblocktrans %}</p>
{% endblock %}

View file

@ -0,0 +1,9 @@
{% extends "socialaccount/base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Social Network Login Failure" %}{% endblock title %}
{% block page_title %}{% trans "Social Network Login Failure" %}{% endblock page_title %}
{% block content %}
<p>{% trans "An error occurred while attempting to login via your social network account." %}</p>
{% endblock %}

View file

@ -0,0 +1 @@
{% extends "account/base.html" %}

View file

@ -0,0 +1,50 @@
{% extends "socialaccount/base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Account Connections" %}{% endblock title %}
{% block page_title %}{% trans "Account Connections" %}{% endblock page_title %}
{% block content %}
{% if form.accounts %}
<p>{% blocktrans %}You can sign in to your account using any of the following third party accounts:{% endblocktrans %}</p>
<form method="post" action="{% url 'socialaccount_connections' %}">
{% csrf_token %}
{% if form.non_field_errors %}<div class="text-error">{{form.non_field_errors}}</div>{% endif %}
<table class="table table-condensed">
<thead>
<tr>
<th><span class="sr-only">{% trans "Select" %}</span></th>
<th>{% trans "Provider" %}</th>
<th>{% trans "Account name" %}</th>
</tr>
</thead>
<tbody>
{% for base_account in form.accounts %}
{% with account=base_account.get_provider_account provider=base_account.provider %}
<tr>
<td><input id="id_account_{{base_account.id}}" type="radio" name="account" value="{{base_account.id}}"/></td>
<td><label for="id_account_{{base_account.id}}"><i
class="fa fa-{% if provider == 'twitter' %}twitter{% elif provider == 'google' %}google{% elif provider == 'xing' %}xing{% elif provider == 'linkedin_oauth2' %}linkedin{% endif %}"></i> <span class="socialaccount_provider {{provider}} {{account.get_brand.id}}">{{account.get_brand.name}}</span></label></td>
<td>{{ account }}</td>
</tr>
{% endwith %}
{% endfor %}
</tbody>
</table>
<button class="btn btn-warning" type="submit">{% trans 'Remove' %}</button>
</form>
{% else %}
<p>{% trans 'You currently have no social network accounts connected to this account.' %}</p>
{% endif %}
<h2>{% trans 'Add a 3rd Party Account' %}</h2>
<ul class="list-inline">
{% include "socialaccount/snippets/provider_list.html" with process="connect" %}
</ul>
{% endblock %}
{% block extra_js %}
{% include "socialaccount/snippets/login_extra.html" %}
{% endblock extra_js %}

View file

@ -0,0 +1,10 @@
{% extends "socialaccount/base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Login Cancelled" %}{% endblock title %}
{% block page_title %}{% trans "Login Cancelled" %}{% endblock page_title %}
{% block content %}
{% url 'account_login' as login_url %}
<p>{% blocktrans %}You decided to cancel logging in to our site using one of your existing accounts. If this was a mistake, please proceed to <a href="{{login_url}}">sign in</a>.{% endblocktrans %}</p>
{% endblock %}

View file

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}The social account has been connected.{% endblocktrans %}

View file

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}The social account is already connected to a different account.{% endblocktrans %}

View file

@ -0,0 +1,2 @@
{% load i18n %}
{% blocktrans %}The social account has been disconnected.{% endblocktrans %}

View file

@ -0,0 +1,17 @@
{% extends "socialaccount/base.html" %}
{% load i18n crispy_forms_tags %}
{% block title %}{{ block.super }} - {% trans "Signup" %}{% endblock title %}
{% block page_title %}{% trans "Sign Up" %}{% endblock page_title %}
{% block content %}
<p>{% blocktrans with provider_name=account.get_provider.name site_name=site.name %}You are about to use your {{provider_name}} account to login to
{{site_name}}. As a final step, please complete the following form:{% endblocktrans %}</p>
<form class="signup" id="signup_form" method="post" action="{% url 'socialaccount_signup' %}">
{% csrf_token %}
{{ form | crispy }}
{% if redirect_field_value %}<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />{% endif %}
<button class="btn btn-primary" type="submit">{% trans "Sign Up" %} &raquo;</button>
</form>
{% endblock %}

View file

@ -0,0 +1,4 @@
{% load socialaccount %}
<!-- start provider js -->
{% providers_media_js %}
<!-- end provider js -->

View file

@ -0,0 +1,21 @@
{% load socialaccount %}
{% for provider in socialaccount.providers %}
{% if provider.id == "openid" %}
{% for brand in provider.get_brands %}
<li>
<a title="{{brand.name}}"
class="socialaccount_provider {{provider.id}} {{brand.id}}"
href="{% provider_login_url provider.id openid=brand.openid_url process=process %}"
>{{brand.name}}</a>
</li>
{% endfor %}
{% endif %}
<li>
<a title="{{provider.name}}"
class="socialaccount_provider {{provider.id}}"
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}"><i
class="fa fa-{% if provider.id == 'twitter' %}twitter{% elif provider.id == 'google' %}google{% elif provider.id == 'xing' %}xing{% elif provider.id == 'linkedin_oauth2' %}linkedin{% endif %}"></i>&nbsp;{{provider.name}}</a>
</li>
{% endfor %}