From 851142446db53724fa2cd366fbf96a03c8c62cf9 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sun, 11 Jul 2021 22:56:43 +1000 Subject: [PATCH] Usability tweak - [edit] on diff page should go back to diff page --- backend/__init__.py | 6 +++++- backend/templates/base.html | 2 +- backend/templates/edit.html | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/__init__.py b/backend/__init__.py index 9a92d456..1b668087 100644 --- a/backend/__init__.py +++ b/backend/__init__.py @@ -427,7 +427,11 @@ def changedetection_app(config=None, datastore_o=None): flash('Notifications queued.') - return redirect(url_for('index')) + # Diff page [edit] link should go back to diff page + if request.args.get("next") and request.args.get("next") == 'diff': + return redirect(url_for('diff_history_page', uuid=uuid)) + else: + return redirect(url_for('index')) else: if request.method == 'POST' and not form.validate(): diff --git a/backend/templates/base.html b/backend/templates/base.html index 4171142e..745588ad 100644 --- a/backend/templates/base.html +++ b/backend/templates/base.html @@ -45,7 +45,7 @@ {% else %}
  • - EDIT + EDIT
  • {% endif %} {% else %} diff --git a/backend/templates/edit.html b/backend/templates/edit.html index 3e828e49..b6275477 100644 --- a/backend/templates/edit.html +++ b/backend/templates/edit.html @@ -2,7 +2,7 @@ {% block content %} {% from '_helpers.jinja' import render_field %}
    -
    +
    {{ render_field(form.url, placeholder="https://...", size=30, required=true) }}