From e5cce0fd4bc274fab674b76ed0f4f7fe433b86c1 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Sat, 9 Nov 2024 16:31:45 +1100 Subject: [PATCH] Persist account names on transaction editor on refresh --- drcr/static/js/combobox.js | 4 ++++ drcr/templates/journal/journal_edit_transaction.html | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drcr/static/js/combobox.js b/drcr/static/js/combobox.js index 1a232d0..0bb26a2 100644 --- a/drcr/static/js/combobox.js +++ b/drcr/static/js/combobox.js @@ -57,6 +57,10 @@ function initCombobox(elCombobox) { updateComboboxInputs(elCombobox, elInput); }); }); + + // Disable autocomplete + // Set this in Javascript rather than in HTML so that browser will continue to persist values after refresh + elInput.autocomplete = 'off'; } // Init comboboxes diff --git a/drcr/templates/journal/journal_edit_transaction.html b/drcr/templates/journal/journal_edit_transaction.html index f18849a..b090276 100644 --- a/drcr/templates/journal/journal_edit_transaction.html +++ b/drcr/templates/journal/journal_edit_transaction.html @@ -33,7 +33,7 @@
- + {% include 'components/accounts_combobox_inner.html' %}
@@ -69,7 +69,7 @@
- + {% include 'components/accounts_combobox_inner.html' %}
@@ -133,7 +133,7 @@
- + {% include 'components/accounts_combobox_inner.html' %}