From b6e82256c0c9b14c56778dd8421611b095b23589 Mon Sep 17 00:00:00 2001 From: jChenvan <188939308+jChenvan@users.noreply.github.com> Date: Thu, 10 Jul 2025 10:46:42 -0400 Subject: [PATCH] Back button now redirects correctly --- docker/ploughshares/app.py | 8 +++++++- docker/ploughshares/templates/pending_approval.html | 2 +- docker/ploughshares/templates/view_transaction.html | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docker/ploughshares/app.py b/docker/ploughshares/app.py index 7c13237..a075787 100644 --- a/docker/ploughshares/app.py +++ b/docker/ploughshares/app.py @@ -291,6 +291,12 @@ def get_transaction_documents(transaction_id): @app.route('/transaction/') def view_transaction(id): + """ + Get Source (Either homepage or pending page) + """ + + source = request.args.get("src") + """ View a transaction """ @@ -331,7 +337,7 @@ def view_transaction(id): if transaction is None: abort(404) - return render_template('view_transaction.html', transaction=transaction, documents=documents, prev_id=prev_id, next_id=next_id, version=VERSION) + return render_template('view_transaction.html', transaction=transaction, documents=documents, prev_id=prev_id, next_id=next_id, version=VERSION, source = source) @app.route('/document/') def view_document(document_id): diff --git a/docker/ploughshares/templates/pending_approval.html b/docker/ploughshares/templates/pending_approval.html index 4e42114..b6229ff 100644 --- a/docker/ploughshares/templates/pending_approval.html +++ b/docker/ploughshares/templates/pending_approval.html @@ -52,7 +52,7 @@