Add proper email notifications
This commit is contained in:
44
templates/account/close.html
Normal file
44
templates/account/close.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Close your hamprint account{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-md mx-auto py-8">
|
||||
<div class="bg-white border border-red-200 rounded-lg p-8 shadow-sm">
|
||||
<h1 class="text-2xl font-bold tracking-tight text-red-700">Close your account</h1>
|
||||
<p class="text-slate-700 mt-2 text-sm">
|
||||
Signed in as
|
||||
<span class="font-medium">{{ user.email|default:user.get_username }}</span>.
|
||||
This action permanently deletes your account.
|
||||
</p>
|
||||
|
||||
<div class="mt-4 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-900">
|
||||
<p class="font-semibold">There is no undo.</p>
|
||||
<ul class="mt-2 list-disc pl-5 space-y-1">
|
||||
<li>Your user row is deleted from the database.</li>
|
||||
<li>
|
||||
{% if submission_count == 0 %}
|
||||
You don't have any prints in the system right now -- nothing else to remove.
|
||||
{% elif submission_count == 1 %}
|
||||
Your <strong>1</strong> print is deleted along with your account, including any uploaded STL.
|
||||
{% else %}
|
||||
All <strong>{{ submission_count }}</strong> of your prints are deleted along with your account, including any uploaded STLs.
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>Any active queue items are cancelled. Operators won't be able to contact you afterwards.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<form method="post" class="mt-6">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="w-full px-4 py-3 rounded-md bg-red-600 text-white hover:bg-red-700 font-medium">
|
||||
Yes, delete my account permanently
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div class="mt-4 text-center">
|
||||
<a href="{% url 'dashboard:my_prints' %}" class="text-sm text-slate-600 hover:underline">← Cancel, take me back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
27
templates/account/logout.html
Normal file
27
templates/account/logout.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Sign out — hamprint{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-md mx-auto py-8">
|
||||
<div class="bg-white border border-slate-200 rounded-lg p-8 shadow-sm">
|
||||
<h1 class="text-2xl font-bold tracking-tight">Sign out?</h1>
|
||||
<p class="text-slate-600 mt-2 text-sm">
|
||||
You're signed in as
|
||||
<span class="font-medium">{{ user.email|default:user.get_username }}</span>.
|
||||
Your prints stay on the dashboard either way -- you can come back any time.
|
||||
</p>
|
||||
|
||||
<form method="post" action="{% url 'account_logout' %}" class="mt-6">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="w-full px-4 py-3 rounded-md bg-amber-500 text-white hover:bg-amber-600 font-medium">
|
||||
Sign me out
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div class="mt-4 text-center">
|
||||
<a href="{% url 'dashboard:my_prints' %}" class="text-sm text-slate-600 hover:underline">← Back to my prints</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user