From c61bb2e90dc1c27e270c95ce0a70dab7553f7008 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 7 Oct 2020 09:39:40 +0200 Subject: [PATCH] When we credit the note of a club directly, fill the last name and the first name information with the club name instead of empty --- apps/note/static/note/js/transfer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/note/static/note/js/transfer.js b/apps/note/static/note/js/transfer.js index f6b23b29..9fb429d0 100644 --- a/apps/note/static/note/js/transfer.js +++ b/apps/note/static/note/js/transfer.js @@ -67,7 +67,11 @@ $(document).ready(function () { last.quantity = 1 - if (!last.note.user) { + if (last.note.club) { + $('#last_name').val(last.note.name) + $('#first_name').val(last.note.name) + } + else if (!last.note.user) { $.getJSON('/api/note/note/' + last.note.id + '/?format=json', function (note) { last.note.user = note.user $.getJSON('/api/user/' + last.note.user + '/', function (user) {