From 4fcdcc0b77ba7bbce5751b090391c3ce29a9ed4c Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Tue, 10 Sep 2024 08:29:44 +1200 Subject: [PATCH] move import and export to dedicated form #316 rather than mixing it in with the settings --- app/templates/user/_user_nav.html | 3 + app/templates/user/edit_settings.html | 7 --- app/templates/user/import_export.html | 35 ++++++++++++ app/user/forms.py | 8 ++- app/user/routes.py | 81 +++++++++++++++++---------- 5 files changed, 95 insertions(+), 39 deletions(-) create mode 100644 app/templates/user/import_export.html diff --git a/app/templates/user/_user_nav.html b/app/templates/user/_user_nav.html index 8a5e5021..51f50caf 100644 --- a/app/templates/user/_user_nav.html +++ b/app/templates/user/_user_nav.html @@ -10,6 +10,9 @@ {{ _('Blocks & Filters') }} + + {{ _('Import & Export') }} + \ No newline at end of file diff --git a/app/templates/user/edit_settings.html b/app/templates/user/edit_settings.html index 233a1eea..4c6ea85f 100644 --- a/app/templates/user/edit_settings.html +++ b/app/templates/user/edit_settings.html @@ -34,14 +34,7 @@ {{ render_field(form.default_filter) }} {{ render_field(form.theme) }} {{ render_field(form.vote_privately) }} -
Export community subscriptions and user settings
- {{ render_field(form.export_settings) }} -{{ _('Delete account') }} diff --git a/app/templates/user/import_export.html b/app/templates/user/import_export.html new file mode 100644 index 00000000..15c40d5f --- /dev/null +++ b/app/templates/user/import_export.html @@ -0,0 +1,35 @@ +{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %} + {% extends 'themes/' + theme() + '/base.html' %} +{% else %} + {% extends "base.html" %} +{% endif %} %} +{% from 'bootstrap/form.html' import render_field %} +{% set active_child = 'settings' %} + +{% block app_content %} + +