Splits user view out and adds template

This commit is contained in:
Mouse Reeve
2021-06-14 09:57:51 -07:00
parent fd753d47ce
commit 7ae64c2a68
12 changed files with 233 additions and 157 deletions

View File

@ -1,4 +1,4 @@
{% extends 'preferences/preferences_layout.html' %}
{% extends 'preferences/layout.html' %}
{% load i18n %}
{% block title %}{% trans "Blocked Users" %}{{ author.name }}{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends 'preferences/preferences_layout.html' %}
{% extends 'preferences/layout.html' %}
{% load i18n %}
{% block title %}{% trans "Change Password" %}{% endblock %}

View File

@ -0,0 +1,27 @@
{% extends 'preferences/layout.html' %}
{% load i18n %}
{% block title %}{% trans "Delete Account" %}{% endblock %}
{% block header %}
{% trans "Delete Account" %}
{% endblock %}
{% block panel %}
{% if form.non_field_errors %}
<p class="notification is-danger">{{ form.non_field_errors }}</p>
{% endif %}
<div class="block">
<h2 class="title is-4">{% trans "Permanently delete account" %}</h2>
<p class="help">{% trans "Deleting your account cannot be undone. The username will not be available to register in the future." %}</p>
<form name="delete-account" action="/delete-account" method="post">
<div class="field">
<label class="label" for="id_password">{% trans "Confirm password" %}</label>
<input class="input" type="password" name="password" id="id_password">
</div>
<button type="submit" class="is-danger">Delete</button>
</form>
</div>
{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends 'preferences/preferences_layout.html' %}
{% extends 'preferences/layout.html' %}
{% load i18n %}
{% block title %}{% trans "Edit Profile" %}{% endblock %}
@ -69,4 +69,3 @@
</div>
<div class="block"><button class="button is-primary" type="submit">{% trans "Save" %}</button></div>
</form>
{% endblock %}

View File

@ -18,6 +18,10 @@
{% url 'prefs-password' as url %}
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Change Password" %}</a>
</li>
<li>
{% url 'prefs-delete' as url %}
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Delete Account" %}</a>
</li>
</ul>
<h2 class="menu-label">{% trans "Relationships" %}</h2>
<ul class="menu-list">