Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #97 from osmfj/user_account_emails
Browse files Browse the repository at this point in the history
User account emails
  • Loading branch information
miurahr committed Jul 20, 2015
2 parents 022ac59 + e2d20b7 commit 1bf28e8
Show file tree
Hide file tree
Showing 24 changed files with 785 additions and 413 deletions.
Binary file modified locale/ja/LC_MESSAGES/django.mo
Binary file not shown.
942 changes: 529 additions & 413 deletions locale/ja/LC_MESSAGES/django.po

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions sotmjp/templates/account/_login_sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{# provide log in sidebar here #}
1 change: 1 addition & 0 deletions sotmjp/templates/account/_signup_sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{# provide sign up in sidebar here #}
19 changes: 19 additions & 0 deletions sotmjp/templates/account/delete.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% extends "account/base.html" %}

{% load i18n %}

{% block body_class %}account account-delete{% endblock %}

{% block head_title %}{% trans "Delete Account" %}{% endblock %}

{% block body %}
<h1>{% trans "Delete Account" %}</h1>

<p>{% blocktrans %}If you go ahead and delete your account, your information will be <b>expunged within {{ ACCOUNT_DELETION_EXPUNGE_HOURS }} hours</b>.{% endblocktrans %}</p>

<form method="post" action="{% url "account_delete" %}" autocapitalize="off">
{% csrf_token %}
<button type="submit" class="btn btn-danger">{% trans "Delete My Account" %}</button>
</form>

{% endblock %}
6 changes: 6 additions & 0 deletions sotmjp/templates/account/email/email_confirmation_message.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% load i18n account_tags %}{% blocktrans with site_name=current_site.name %}A user on {{ site_name }} has created an account using this email address.

To confirm this email address, go to {{ activate_url }}

If you did not sign up for this site, you can ignore this message.
{% endblocktrans %}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% load i18n %}{% blocktrans with site_name=current_site.name %}Confirm email address for {{ site_name }}{% endblocktrans %}
4 changes: 4 additions & 0 deletions sotmjp/templates/account/email/invite_user.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% load i18n %}{% blocktrans with name=current_site.name %}You have been invited to sign up at {{ name }}.

{{ signup_url }}
{% endblocktrans %}
1 change: 1 addition & 0 deletions sotmjp/templates/account/email/invite_user_subject.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% load i18n %}{% blocktrans with name=current_site.name %}Create an account on {{ name }}{% endblocktrans %}
1 change: 1 addition & 0 deletions sotmjp/templates/account/email/password_change.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% load i18n %}{% blocktrans with now=user.account.now %}This is the email notification to confirm your password has been changed on {{ now }}.{% endblocktrans %}
1 change: 1 addition & 0 deletions sotmjp/templates/account/email/password_change_subject.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% load i18n %}{% trans "Change password email notification" %}
5 changes: 5 additions & 0 deletions sotmjp/templates/account/email/password_reset.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% load i18n %}{% blocktrans with site_name=current_site.name %}You're receiving this email because you or someone else has requested a password for your user account at {{ site_name }}.
It can be safely ignored if you did not request a password reset. Click the link below to reset your password.

{{ password_reset_url }}
{% endblocktrans %}
1 change: 1 addition & 0 deletions sotmjp/templates/account/email/password_reset_subject.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% load i18n %}{% blocktrans with site_name=current_site.name %}[{{ site_name }}] Password reset{% endblocktrans %}
20 changes: 20 additions & 0 deletions sotmjp/templates/account/email_confirm.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% extends "site_base.html" %}

{% load i18n %}

{% block head_title %}{% trans "Confirm Email" %}{% endblock %}

{% block body %}
<div class="row">
<div class="col-md-5">
<form method="post" action="{% url "account_confirm_email" key=confirmation.key %}">
<legend>{% trans "Confirm Email" %}</legend>
<fieldset>
{% csrf_token %}
<p>{% blocktrans with email=confirmation.email_address.email %}Confirm email address <b>{{ email }}</b>?{% endblocktrans %}</p>
<button type="submit" class="btn btn-primary">{% trans "Confirm" %}</button>
</fieldset>
</form>
</div>
</div>
{% endblock %}
12 changes: 12 additions & 0 deletions sotmjp/templates/account/email_confirmation_sent.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "site_base.html" %}

{% load i18n %}

{% block head_title %}{% trans "Confirm your email address" %}{% endblock %}

{% block body %}
<h2>{% trans "Confirm your email address" %}</h2>

<p>{% blocktrans %}We have sent you an email to <b>{{ email }}</b> for verification. Follow the link provided to finalize the signup process. If you do not receive it within a few minutes, contact us at <a href="mailto:{{ THEME_CONTACT_EMAIL }}">{{ THEME_CONTACT_EMAIL }}</a>.{% endblocktrans %}</p>
<p><a href="{{ success_url }}">{% trans "Go back" %}</a></p>
{% endblock %}
10 changes: 10 additions & 0 deletions sotmjp/templates/account/email_confirmed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% extends "site_base.html" %}

{% load i18n %}

{% block head_title %}{% trans "Email confirmed" %}{% endblock %}

{% block body %}
<h1>{% trans "Email confirmed" %}</h1>
<p>{% blocktrans with email=confirmation.email_address.email %}You have confirmed <b>{{ email }}</b>{% endblocktrans %}</p>
{% endblock %}
20 changes: 20 additions & 0 deletions sotmjp/templates/account/logout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% extends "site_base.html" %}

{% load i18n %}

{% block head_title %}{% trans "Log out" %}{% endblock %}

{% block body %}
<div class="row">
<div class="col-md-5">
<form method="POST" action="{% url "account_logout" %}">
<legend>{% trans "Log out" %}</legend>
<fieldset>
{% csrf_token %}
<p>{% trans "Are you sure you want to log out?" %}</p>
<button type="submit" class="btn btn-primary">{% trans "Log out" %}</button>
</fieldset>
</form>
</div>
</div>
{% endblock %}
23 changes: 23 additions & 0 deletions sotmjp/templates/account/password_change.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{% extends "account/base.html" %}

{% load i18n %}
{% load bootstrap %}

{% block body_class %}account account-password{% endblock %}

{% block head_title %}{% trans "Change password" %}{% endblock %}

{% block body %}
<div class="row">
<div class="col-md-5">
<form method="POST" action="">
<legend>{% trans "Change password" %}</legend>
<fieldset>
{% csrf_token %}
{{ form|bootstrap }}
<button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
</fieldset>
</form>
</div>
</div>
{% endblock %}
36 changes: 36 additions & 0 deletions sotmjp/templates/account/password_reset.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% extends "site_base.html" %}

{% load i18n %}
{% load bootstrap %}
{% load account_tags %}

{% block head_title %}{% trans "Password reset" %}{% endblock %}

{% user_display request.user as user_display %}

{% block body %}
<div class="row">
<div class="col-md-8">
<form method="POST" action="">
<legend>{% trans "Password reset" %}</legend>
<p class="lead">{% trans "Forgotten your password? Enter your email address below, and we'll send you an email allowing you to reset it." %}</p>
<fieldset class="row">
<div class="col-md-5">
{% csrf_token %}
{{ form|bootstrap }}
<button type="submit" class="btn btn-primary">
{% trans "Reset my password" %}
</button>
</div>
</fieldset>
</form>
</div>
</div>
<p>{% blocktrans %}If you have any trouble resetting your password, contact us at <a href="mailto:{{ THEME_CONTACT_EMAIL }}">{{ THEME_CONTACT_EMAIL }}</a>.{% endblocktrans %}</p>
{% endblock %}

{% block extra_body %}
<script>
$("#id_email").focus();
</script>
{% endblock %}
27 changes: 27 additions & 0 deletions sotmjp/templates/account/password_reset_sent.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{% extends "site_base.html" %}

{% load i18n %}
{% load account_tags %}

{% block head_title %}{% trans "Password reset sent" %}{% endblock %}

{% block body %}
<h1>{% trans "Password reset sent" %}</h1>
{% if not resend %}
<p>{% blocktrans %}We have sent you an email. If you do not receive it within a few minutes, try resending or contact us at <a href="mailto:{{ THEME_CONTACT_EMAIL }}">{{ THEME_CONTACT_EMAIL }}</a>.{% endblocktrans %}</p>

<div class="row">
<div class="col-md-5">
<form method="POST" action="{% url "account_password_reset" %}">
{% csrf_token %}
{% for field in form %}
{{ field.as_hidden }}
{% endfor %}
<button type="submit" name="resend" class="btn btn-primary">{% trans "Resend" %}</button>
</form>
</div>
</div>
{% else %}
<p>{% blocktrans %}We have resent the password email. If you do not receive it within a few minutes, contact us at <a href="mailto:{{ THEME_CONTACT_EMAIL }}">{{ THEME_CONTACT_EMAIL }}</a>.{% endblocktrans %}</p>
{% endif %}
{% endblock %}
21 changes: 21 additions & 0 deletions sotmjp/templates/account/password_reset_token.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% extends "site_base.html" %}

{% load i18n %}
{% load bootstrap %}

{% block head_title %}{% trans "Set your new password" %}{% endblock %}

{% block body %}
<div class="row">
<div class="col-md-5">
<form method="POST" action="{% url "account_password_reset_token" uidb36=uidb36 token=token %}">
<legend>{% trans "Set your new password" %}</legend>
<fieldset>
{% csrf_token %}
{{ form|bootstrap }}
<button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
</fieldset>
</form>
</div>
</div>
{% endblock %}
11 changes: 11 additions & 0 deletions sotmjp/templates/account/password_reset_token_fail.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends "site_base.html" %}

{% load i18n %}

{% block head_title %}{% trans "Bad token" %}{% endblock %}

{% block body %}
<h1>{% trans "Bad token" %}</h1>
{% url "account_password_reset" as url %}
<p>{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ url }}">new password reset</a>.{% endblocktrans %}</p>
{% endblock %}
21 changes: 21 additions & 0 deletions sotmjp/templates/account/settings.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% extends "account/base.html" %}

{% load i18n %}
{% load bootstrap %}

{% block body_class %}account account-settings{% endblock %}

{% block head_title %}{% trans "Account" %}{% endblock %}

{% block body %}
<div class="row">
<div class="col-md-5">
<form method="POST" action="{% url "account_settings" %}">
<legend>{% trans "Account" %}</legend>
{% csrf_token %}
{{ form|bootstrap }}
<button class="btn btn-primary" type="submit">{% trans "Save" %}</button>
</form>
</div>
</div>
{% endblock %}
14 changes: 14 additions & 0 deletions sotmjp/templates/account/signup_closed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% extends "site_base.html" %}

{% load i18n %}

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

{% block body %}
<h1>{% trans "This site is in private beta" %}</h1>
<p>{% blocktrans %}If you have signup code you can enter it below.{% endblocktrans %}</p>
<form method="get" action="">
<div><input type="text" name="code" placeholder="Your signup code..." /></div>
<div><input type="submit" class="btn btn-primary"></div>
</form>
{% endblock %}

0 comments on commit 1bf28e8

Please sign in to comment.