-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add form for users to delete their own accounts
- Loading branch information
Showing
16 changed files
with
426 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{% extends "h:templates/layouts/account.html.jinja2" %} | ||
|
||
{% set page_route = 'account_delete' %} | ||
{% set page_title = 'Delete your account' %} | ||
|
||
{% block tabs %}{% endblock tabs %} | ||
|
||
{% block page_content %} | ||
<h1 class="form-header">{% trans %}Delete your account{% endtrans %}</h1> | ||
|
||
<div class="form-description"> | ||
<p>{% trans %}Are you sure you want to delete your account?{% endtrans %}</p> | ||
|
||
<p> | ||
{% set username = request.user.username %} | ||
|
||
{% if count == 0 %} | ||
{% trans %}This will delete user <strong>{{ username }}</strong>.{% endtrans %} | ||
{% else %} | ||
{% set oldest_str = oldest.strftime("%B %-d %Y") %} | ||
{% set newest_str = newest.strftime("%B %-d %Y") %} | ||
|
||
{% if oldest_str == newest_str %} | ||
{% trans count=count %} | ||
This will delete user <strong>{{ username }}</strong>, | ||
including 1 annotation | ||
from <strong>{{ oldest_str }}</strong>. | ||
{% pluralize count %} | ||
This will delete user <strong>{{ username }}</strong>, | ||
including <strong>{{ count }}</strong> annotations | ||
from <strong>{{ oldest_str }}</strong>. | ||
{% endtrans %} | ||
{% else %} | ||
{% trans %} | ||
This will delete user <strong>{{ username }}</strong>, | ||
including <strong>{{ count }}</strong> annotations | ||
spanning <strong>{{ oldest_str }}</strong> | ||
to <strong>{{ newest_str }}</strong>. | ||
{% endtrans %} | ||
{% endif %} | ||
{% endif %} | ||
</p> | ||
|
||
<p>{% trans %}This cannot be undone!{% endtrans %}</p> | ||
</div> | ||
|
||
{{ form }} | ||
{% endblock page_content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% extends "h:templates/accounts/base.html.jinja2" %} | ||
|
||
{% block page_title %}{% trans %}Account deleted{% endtrans %}{% endblock %} | ||
|
||
{% set form_message %}{% trans %}Your account has been deleted.{% endtrans %}{% endset %} | ||
{% set signup_message = "Don't have a Hypothesis account?" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.