From 1037385428667ca3d14fdf4bbc7e3ee5fb0d4e5c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 23 Feb 2015 17:09:20 +0100 Subject: [PATCH] Bug 9742: Does not display the popup on creating new record MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The new confirmation on starting a z39.50 serach in cataloguing always pops up, even when you are working on a new record that has not been saved yet. Test plan: 1/ Edit an existing record, click on the Z3950 search button, confirm the popup appears. 2/ Create a new record, click on the Z3950 search button, confirm the popup does not appear. Followed test plan. Works as expected. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi Works as expected, Gustavo (librarian) convinced me that "it doesn't hurt that much" with the test for new record. Happy easter :-D (cherry picked from commit f0711f0d0d8f0b824ef9895367a6c7e2389d6e7a) Signed-off-by: Chris Cormack --- .../prog/en/modules/cataloguing/addbiblio.tt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index ab92ae738a..c530ce0120 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -69,10 +69,15 @@ } }); + [%# Only ask for a confirmation if it is an edit %] $("#z3950search").click(function(){ - if (confirm(_("Please note that this external search could replace the current record."))){ + [% IF biblionumber %] + if (confirm(_("Please note that this external search could replace the current record."))){ + PopupZ3950(); + } + [% ELSE %] PopupZ3950(); - } + [% END %] }); $("#saverecord").click(function(){ -- 2.39.5