diff --git a/uipa_org/templates/account/settings.html b/uipa_org/templates/account/settings.html new file mode 100644 index 000000000..83a367fc5 --- /dev/null +++ b/uipa_org/templates/account/settings.html @@ -0,0 +1,185 @@ +{% extends 'account/settings_base.html' %} +{% load i18n %} +{% load form_helper %} +{% load account_tags %} + +{% block settings_body %} +

{% trans "Account Settings" %}

+
+
{% blocktrans %}Your name:{% endblocktrans %}
+
+ {{ request.user.get_full_name }} + {% block settings_name %}{% endblock %} +
+
{% trans "Account Privacy:" %}
+
+ {% if request.user.private %} + + {% blocktrans %}Your name is hidden on the web.{% endblocktrans %} + {% else %} + {% blocktrans %}Your name is visible.{% endblocktrans %} + {% block settings_privacy %}{% endblock %} + {% trans "Make my account private" %} +
+
+
+ {% csrf_token %} +

+ {% blocktrans %} + If you changed your mind about the public visibility of your account name, we can change your account to private. This will automatically remove your name where it is currently publicly visible. + {% endblocktrans %} +

+
+ {% blocktrans %}This account-wide setting cannot be undone.
Your account will stay private once you set it to private.{% endblocktrans %} + {% blocktrans %}Any public profile information will be removed.{% endblocktrans %} +
+

+ {% trans "You are still responsible for redacting attachments when they contain your personal information." %} +

+ +
+
+
+ {% endif %} +
+
+
+
{% trans "Change details" %}
+
+
+ {% csrf_token %} + {% if change_form %} + {% render_form change_form %} + {% else %} + {% render_form request.user.get_change_form %} + {% endif %} + +
+
+
+
+
{% trans "Account settings" %}
+
+
+ {% csrf_token %} + {% if account_settings_form %} + {% render_form account_settings_form %} + {% else %} + {% render_form request.user.get_account_settings_form %} + {% endif %} + +
+
+
+ {% if not request.user.private %} +
+
{% trans "Public profile" %}
+
+

+ {% translate "Your public profile" %} +

+
+ {% csrf_token %} + {% if profile_form %} + {% render_form profile_form %} + {% else %} + {% render_form request.user.get_profile_form %} + {% endif %} + +
+
+
+ {% endif %} + {% include "account/includes/change_password_form.html" %} +
+
{% translate "Setup two-factor login" %}
+
+ {% recentauthrequired "mfa" %} + {% if not request.user.has_usable_password %} +

{% translate "You need to set a password first." %}

+ {% else %} + {% get_mfa_keys as mfa_keys %} + {% if mfa_keys.all %} +

{% translate "You have the following two-factor login methods active:" %}

+ + {% else %} +

{% translate "You have not setup any two-factor login methods." %}

+ {% endif %} + {% translate "Manage two-factor login methods" %} + {% endif %} + {% endrecentauthrequired %} +
+
+{% block post_password %}{% endblock %} + +
+
+
{% trans "Export your data" %}
+
+ {% recentauthrequired "export" %} +
+ {% csrf_token %} +

{% trans "We will generate a data export and notify you by email when it is ready." %}

+ +
+ {% endrecentauthrequired %} +
+
+
+
+
{% blocktrans %}Delete your account{% endblocktrans %}
+
+ {% recentauthrequired "delete-account-section" %} +
+

+ + {% trans "Danger: deleting your account cannot be undone." %} + +

+
+ {% csrf_token %} + {% render_form user_delete_form %} +

+ {% blocktrans %}Your FOI requests will not be removed. Only your personal information connected with your account will be removed.{% endblocktrans %} +

+ +
+
+ {% endrecentauthrequired %} +
+
+
+
{% blocktrans %}Developer{% endblocktrans %}
+
+ {% if froide.api_activated %} + {% recentauthrequired "developer" %} + {% trans "Your OAuth Applications" %} + {% endrecentauthrequired %} + {% endif %} +
+
+{% endblock %} \ No newline at end of file diff --git a/uipa_org/templates/account/settings_base.html b/uipa_org/templates/account/settings_base.html new file mode 100644 index 000000000..1211e8b75 --- /dev/null +++ b/uipa_org/templates/account/settings_base.html @@ -0,0 +1,34 @@ +{% extends 'account/base.html' %} +{% load i18n %} +{% block breadcrumbs %} + {% url "account-settings" as settings_url %} + {% translate "Settings" as settings_name %} + {% include "account/includes/breadcrumbs.html" with section_name=settings_name section_url=settings_url last_item=last_item %} +{% endblock %} +{% block app_container %} +
+
+ + +
+
+ {% block settings_body %}{% endblock %} +
+
+{% endblock %} \ No newline at end of file