From faab5c4c2445b8a3454c17d2ab29fb65b601c0c9 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 15 Jul 2015 11:50:18 +0100 Subject: [PATCH] Bug 12525: Prevent adding several patron lists with the same name If you add patron to a patron list, from the patron search result, a list is created when you click on "Save". The list is considered as new each time. To reproduce: 1/ Launch a patron search 2/ Select 1 patron, and create a new list 'aaa' 3/ Select another patron and click Save again 2 lists are created Test plan: 1/ Launch a patron search 2/ Select 1 patron, and create a new list 'aaa' The dropdown list should be populated with this new list, and should be selected 3/ Select another patron and click Save again Only 1 list should be created Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 7f65aaac748833b57f9f1c8ae754d66c7e144d81) Signed-off-by: Chris Cormack --- .../intranet-tmpl/prog/en/modules/members/member.tt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index aac6657f7d..877be25323 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -76,6 +76,16 @@ $(document).ready(function() { $("#patron_list_dialog > span.patrons-length").html(data.patrons_added_to_list); $("#patron_list_dialog > a").attr("href", "/cgi-bin/koha/patron_lists/list.pl?patron_list_id=" + data.patron_list.patron_list_id); $("#patron_list_dialog > a").html(data.patron_list.name); + if ( $('#add_to_patron_list').val() == 'new' ) { + var new_patron_list_added = $("