Sync with upstream

This commit is contained in:
kappataumu 2016-06-16 11:28:23 +00:00
parent 36c58f1d2c
commit 473ee0760e
17 changed files with 193 additions and 288 deletions

View File

@ -0,0 +1,12 @@
{% raw %}{% extends "account/base.html" %}
{% load i18n %}
{% block head_title %}{% trans "Account Inactive" %}{% endblock %}
{% block inner %}
<h1>{% trans "Account Inactive" %}</h1>
<p>{% trans "This account is inactive." %}</p>
{% endblock %}
{% endraw %}

View File

@ -1,3 +1,4 @@
{% raw %}{% extends "base.html" %} {% raw %}{% extends "base.html" %}
{% block title %}{% block head_title %}{% endblock head_title %}{% endblock title %}
{% endraw %}
{% endraw %}

View File

@ -1,64 +1,58 @@
{% raw %}{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %}
{% block head_title %}{% trans "Account" %}{% endblock %} {% block head_title %}{% trans "Account" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container"> <h1>{% trans "E-mail Addresses" %}</h1>
<div class="row"> {% if user.emailaddress_set.all %}
<div class="col-md-5"> <p>{% trans 'The following e-mail addresses are associated with your account:' %}</p>
<h2>{% trans "E-mail Addresses" %}</h2>
{% 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"> <form action="{% url 'account_email' %}" class="email_list" method="post">
{% csrf_token %} {% csrf_token %}
<fieldset class="blockLabels"> <fieldset class="blockLabels">
{% for emailaddress in user.emailaddress_set.all %} {% for emailaddress in user.emailaddress_set.all %}
<div class="ctrlHolder"> <div class="ctrlHolder">
<label for="email_radio_{{ forloop.counter }}" class="{% if emailaddress.primary %}primary_email{% endif %}"> <label for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}">
<input id="email_radio_{{ forloop.counter }}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{% endif %} value="{{ emailaddress.email }}"/> <input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary or user.emailaddress_set.count == 1 %}checked="checked"{%endif %} value="{{emailaddress.email}}"/>
{{ emailaddress.email }} {{ emailaddress.email }}
{% if emailaddress.verified %} {% if emailaddress.verified %}
<span class="verified">{% trans "Verified" %}</span> <span class="verified">{% trans "Verified" %}</span>
{% else %} {% else %}
<span class="unverified">{% trans "Unverified" %}</span> <span class="unverified">{% trans "Unverified" %}</span>
{% endif %} {% endif %}
{% if emailaddress.primary %}<span class="primary">{% trans "Primary" %}</span>{% endif %} {% if emailaddress.primary %}<span class="primary">{% trans "Primary" %}</span>{% endif %}
</label> </label>
</div>
{% endfor %}
<div class="buttonHolder">
<button class="secondaryAction" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
<button class="secondaryAction" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
<button class="primaryAction" type="submit" name="action_remove" >{% trans 'Remove' %}</button>
</div>
</fieldset>
</form>
{% else %}
<p><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="." class="add_email">
{% csrf_token %}
{{ form|crispy }}
<button class="btn" name="action_add" type="submit">{% trans "Add E-mail" %}</button>
</form>
</div>
</div>
</div> </div>
{% endfor %}
<div class="buttonHolder">
<button class="secondaryAction" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
<button class="secondaryAction" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
<button class="primaryAction" type="submit" name="action_remove" >{% trans 'Remove' %}</button>
</div>
</fieldset>
</form>
{% else %}
<p><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.as_p}}
<button name="action_add" type="submit">{% trans "Add E-mail" %}</button>
</form>
{% endblock %} {% endblock %}

View File

@ -6,32 +6,27 @@
{% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %} {% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container"> <h1>{% trans "Confirm E-mail Address" %}</h1>
<div class="row">
<div class="col-xs-12">
<h2>{% trans "Confirm E-mail Address" %}</h2>
{% if confirmation %} {% if confirmation %}
{% user_display confirmation.email_address.user as user_display %} {% 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> <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 %}"> <form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
{% csrf_token %} {% csrf_token %}
<button id="confirm-button" class="submit" type="submit">{% trans 'Confirm' %}</button> <button type="submit">{% trans 'Confirm' %}</button>
</form> </form>
{% else %} {% else %}
{% url 'account_email' as email_url %} {% 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> <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 %}
{% endif %}
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -1,22 +0,0 @@
{% raw %}{% extends "account/base.html" %}
{% load i18n %}
{% load account %}
{% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2>{% trans "Confirm E-mail Address" %}</h2>
{% user_display email_address.user as user_display %}
<p>{% blocktrans with 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>
</div>
</div>
</div>
{% endblock %}
{% endraw %}

View File

@ -1,48 +1,48 @@
{% raw %}{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load i18n %} {% load i18n %}
{% load account %} {% load account socialaccount %}
{% load socialaccount %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block head_title %}{% trans "Sign In" %}{% endblock %} {% block head_title %}{% trans "Sign In" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>{% trans "Sign In" %}</h2>
{% get_providers as socialaccount_providers %}
{% 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"> <h1>{% trans "Sign In" %}</h1>
<ul class="socialaccount_providers"> {% get_providers as socialaccount_providers %}
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
</ul>
<div class="login-or">{% trans 'or' %}</div> {% 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> <div class="socialaccount_ballot">
{% include "socialaccount/snippets/login_extra.html" %} <ul class="socialaccount_providers">
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
</ul>
{% endif %} <div class="login-or">{% trans 'or' %}</div>
<form class="login" 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 %}
<button id="sign-in-button" class="btn btn-primary" type="submit">{% trans "Sign In" %}</button>
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
</form>
</div>
</div>
</div> </div>
{% include "socialaccount/snippets/login_extra.html" %}
{% 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" 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="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
<button class="primaryAction" type="submit">{% trans "Sign In" %}</button>
</form>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -4,25 +4,19 @@
{% block head_title %}{% trans "Sign Out" %}{% endblock %} {% block head_title %}{% trans "Sign Out" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container"> <h1>{% trans "Sign Out" %}</h1>
<div class="row">
<div class="col-md-5">
<h2>{% trans "Sign Out" %}</h2> <p>{% trans 'Are you sure you want to sign out?' %}</p>
<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 type="submit">{% trans 'Sign Out' %}</button>
</form>
<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-danger" type="submit">{% trans 'Sign Out' %}</button>
</form>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -2,21 +2,16 @@
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block head_title %}{% trans "Change Password" %}{% endblock %} {% block head_title %}{% trans "Change Password" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container"> <h1>{% trans "Change Password" %}</h1>
<div class="row">
<div class="col-md-5">
<h2>{% trans "Change Password" %}</h2>
<form method="POST" action="./" class="password_change"> <form method="POST" action="{% url 'account_change_password' %}" class="password_change">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<button class="btn" type="submit" name="action">{% trans "Change Password" %}</button> <button type="submit" name="action">{% trans "Change Password" %}</button>
</form> </form>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -6,34 +6,21 @@
{% block head_title %}{% trans "Password Reset" %}{% endblock %} {% block head_title %}{% trans "Password Reset" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container">
<div class="row">
<div class="col-md-5">
<h2>{% trans "Password Reset" %}</h2> <h1>{% trans "Password Reset" %}</h1>
{% if user.is_authenticated %} {% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %} {% include "account/snippets/already_logged_in.html" %}
{% endif %} {% 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> <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="./" class="password_reset"> <form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<button class="btn" type="submit">{% trans "Reset My Password" %}</button> <input type="submit" value="{% trans 'Reset My Password' %}" />
</form> </form>
<p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p> <p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% block javascript %}
{{ block.super }}
<script>
$("#id_email").focus();
</script>
{% endblock javascript %}
{% endraw %} {% endraw %}

View File

@ -5,19 +5,13 @@
{% block head_title %}{% trans "Password Reset" %}{% endblock %} {% block head_title %}{% trans "Password Reset" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container"> <h1>{% trans "Password Reset" %}</h1>
<div class="row">
<div class="col-xs-12"> {% if user.is_authenticated %}
<h2>{% trans "Password Reset" %}</h2> {% include "account/snippets/already_logged_in.html" %}
{% endif %}
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %} <p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
{% 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>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -2,31 +2,24 @@
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block head_title %}{% trans "Change Password" %}{% endblock %} {% block head_title %}{% trans "Change Password" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container"> <h1>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h1>
<div class="row">
<div class="col-xs-12">
<h2>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h2>
{% if token_fail %} {% if token_fail %}
{% url 'account_reset_password' as passwd_reset_url %} {% 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> <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 %} {% else %}
{% if form %} {% if form %}
<form method="POST" action="./"> <form method="POST" action=".">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<button type="submit" name="action">{% trans "change password" %}</button> <input type="submit" name="action" value="{% trans 'change password' %}"/>
</form> </form>
{% else %} {% else %}
<p>{% trans 'Your password is now changed.' %}</p> <p>{% trans 'Your password is now changed.' %}</p>
{% endif %} {% endif %}
{% endif %} {% endif %}
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -3,14 +3,8 @@
{% load i18n %} {% load i18n %}
{% block head_title %}{% trans "Change Password" %}{% endblock %} {% block head_title %}{% trans "Change Password" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container"> <h1>{% trans "Change Password" %}</h1>
<div class="row"> <p>{% trans 'Your password is now changed.' %}</p>
<div class="col-md-5">
<h2>{% trans "Change Password" %}</h2>
<p>{% trans 'Your password is now changed.' %}</p>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -1,23 +1,17 @@
{% raw %} {% raw %}{% extends "account/base.html" %}
{% extends "account/base.html" %}
{% load i18n crispy_forms_tags %} {% load i18n %}
{% load crispy_forms_tags %}
{% block head_title %}{% trans "Set Password" %}{% endblock %} {% block head_title %}{% trans "Set Password" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container"> <h1>{% trans "Set Password" %}</h1>
<div class="row">
<div class="col-md-5">
<h2>{% trans "Set Password" %}</h2>
<form method="POST" action="./" class="password_set"> <form method="POST" action="{% url 'account_set_password' %}" class="password_set">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<input type="submit" name="action" value="{% trans "Set Password" %}"/> <input type="submit" name="action" value="{% trans 'Set Password' %}"/>
</form> </form>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -3,31 +3,21 @@
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block title %}{% trans "Signup" %}{% endblock title %} {% block head_title %}{% trans "Signup" %}{% endblock %}
{% block content %} {% block inner %}
<h1>{% trans "Sign Up" %}</h1>
<div class="container"> <p>{% blocktrans %}Already have an account? Then please <a href="{{ login_url }}">sign in</a>.{% endblocktrans %}</p>
<div class="row">
<div class="col-md-5">
<h1>{% trans "Sign Up" %}</h1>
<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 id="sign-up-button" class="btn btn-primary" type="submit">{% trans "Sign Up" %} &raquo;</button>
</form>
</div>
</div>
</div>
{% endblock content %}
<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 type="submit">{% trans "Sign Up" %} &raquo;</button>
</form>
{% endblock %}
{% endraw %} {% endraw %}

View File

@ -4,15 +4,9 @@
{% block head_title %}{% trans "Sign Up Closed" %}{% endblock %} {% block head_title %}{% trans "Sign Up Closed" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container"> <h1>{% trans "Sign Up Closed" %}</h1>
<div class="row">
<div class="col-md-5">
<h2>{% trans "Sign Up Closed" %}</h2>
<p>{% trans "We are sorry, but the sign up is currently closed." %}</p> <p>{% trans "We are sorry, but the sign up is currently closed." %}</p>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -4,16 +4,10 @@
{% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %} {% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container"> <h1>{% trans "Verify Your E-mail Address" %}</h1>
<div class="row">
<div class="col-md-5"> <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>
<h2>{% trans "Verify Your E-mail Address" %}</h2>
<p>{% blocktrans %}We have sent an e-mail to <a href="mailto:{{ email }}">{{ email }}</a> 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>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}

View File

@ -4,25 +4,21 @@
{% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %} {% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %}
{% block content %} {% block inner %}
<div class="container"> <h1>{% trans "Verify Your E-mail Address" %}</h1>
<div class="row">
<div class="col-md-5">
<h2>{% trans "Verify Your E-mail Address" %}</h2>
{% url 'account_email' as email_url %} {% url 'account_email' as email_url %}
<p>{% blocktrans %}This part of the site requires us to verify that <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 you are who you claim to be. For this purpose, we require that you
verify ownership of your e-mail address. {% endblocktrans %}</p> 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>
<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>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% endraw %} {% endraw %}