From 23f46cc59839b3a23776c0d8fc20235b8a2dc11b Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 28 Sep 2021 16:57:23 +0200 Subject: [PATCH] Create transfers when pressing Enter in the amount part Signed-off-by: Yohann D'ANELLO --- apps/note/static/note/js/transfer.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/note/static/note/js/transfer.js b/apps/note/static/note/js/transfer.js index 0ae76501..6c5a0329 100644 --- a/apps/note/static/note/js/transfer.js +++ b/apps/note/static/note/js/transfer.js @@ -222,6 +222,13 @@ $(document).ready(function () { }) }) +// Make transfer when pressing Enter on the amount section +$('#amount, #reason, #last_name, #first_name, #bank').keypress((event) => { + if (event.originalEvent.charCode === 13) { + $('#btn_transfer').click() + } +}) + $('#btn_transfer').click(function () { if (LOCK) { return }