From 64b49b00fff9e4b09ba0af9d37232d4c49800fec Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Sat, 6 Apr 2024 02:00:30 +1100 Subject: [PATCH] Apply custom accounts combobox to transaction editor --- drcr/journal/views.py | 4 +- .../components/accounts_combobox_inner.html | 2 +- .../journal/journal_edit_transaction.html | 184 +++++++++--------- 3 files changed, 90 insertions(+), 100 deletions(-) diff --git a/drcr/journal/views.py b/drcr/journal/views.py index add4ef5..4ba4fa7 100644 --- a/drcr/journal/views.py +++ b/drcr/journal/views.py @@ -38,7 +38,7 @@ def journal(): @app.route('/journal/new-transaction', methods=['GET', 'POST']) def journal_new_transaction(): if request.method == 'GET': - return render_template('journal/journal_edit_transaction.html', transaction=None) + return render_template('journal/journal_edit_transaction.html', transaction=None, all_accounts=all_accounts()) # New transaction transaction = Transaction( @@ -73,7 +73,7 @@ def journal_edit_transaction(): abort(404) if request.method == 'GET': - return render_template('journal/journal_edit_transaction.html', transaction=transaction) + return render_template('journal/journal_edit_transaction.html', transaction=transaction, all_accounts=all_accounts()) if request.form.get('action', None) == 'delete': # Delete transaction diff --git a/drcr/templates/components/accounts_combobox_inner.html b/drcr/templates/components/accounts_combobox_inner.html index d6ac009..fbcd632 100644 --- a/drcr/templates/components/accounts_combobox_inner.html +++ b/drcr/templates/components/accounts_combobox_inner.html @@ -20,7 +20,7 @@ -