From 89b2ff52e3d591a1b83d8edced3a99570e04a793 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sun, 6 Sep 2020 21:38:55 +0200 Subject: [PATCH] Fix I'm the emitter button --- apps/note/templates/note/transaction_form.html | 4 ++-- apps/permission/tests/test_permission_queries.py | 1 - note_kfet/static/js/transfer.js | 5 ++++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/note/templates/note/transaction_form.html b/apps/note/templates/note/transaction_form.html index 9c484799..3f58b793 100644 --- a/apps/note/templates/note/transaction_form.html +++ b/apps/note/templates/note/transaction_form.html @@ -65,9 +65,9 @@ SPDX-License-Identifier: GPL-2.0-or-later

- + {% trans "I am the emitter" %} - +
diff --git a/apps/permission/tests/test_permission_queries.py b/apps/permission/tests/test_permission_queries.py index 4d73ae11..fdd530a5 100644 --- a/apps/permission/tests/test_permission_queries.py +++ b/apps/permission/tests/test_permission_queries.py @@ -78,7 +78,6 @@ class PermissionQueryTestCase(TestCase): query = instanced.query model = perm.model.model_class() model.objects.filter(query).all() - # print("Good query for permission", perm) except (FieldError, AttributeError, ValueError, TypeError, JSONDecodeError): print("Query error for permission", perm) print("Query:", perm.query) diff --git a/note_kfet/static/js/transfer.js b/note_kfet/static/js/transfer.js index db9cf9ac..94190da5 100644 --- a/note_kfet/static/js/transfer.js +++ b/note_kfet/static/js/transfer.js @@ -183,7 +183,10 @@ $(document).ready(function () { if (location.hash) { $('#type_' + location.hash.substr(1)).click() } else { type_transfer.click() } - $('#source_me').click(function () { + $('#source_me').click(function (event) { + // Prevent TurboLinks + event.preventDefault(); + if (LOCK) { return } // Shortcut to set the current user as the only emitter