Add a warning if a Z39.50 search is started from biblio edition page. origin/new/bug_8583
authorFrédérick Capovilla <frederick.capovilla@libeo.com>
Fri, 30 Sep 2011 19:11:01 +0000 (15:11 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 2 Oct 2012 16:00:54 +0000 (18:00 +0200)
Warn the user that the current biblio record might be overwritten by
this action.

http://bugs.koha-community.org/show_bug.cgi?id=8583
Signed-off-by: Marc Veron <veron@veron.ch>
Woks as expected. I prefer this solution with an explicit warning,
since several times I acidentally changed a record  :-)

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt

index 5371398..24d3894 100644 (file)
@@ -238,7 +238,7 @@ function confirm_items_deletion() {
        [% IF ( CAN_user_reserveforothers ) %]
     [% UNLESS ( norequests ) %]<li><a id="placehold" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">Place hold</a></li>[% END %]
        [% END %]
-    [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<li id="z3950searchc"><input type="button" id="z3950search" value="Z39.50 search" onclick="PopupZ3950(); return false;" /></li>[% END %]
+       [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<li id="z3950searchc"><input type="button" id="z3950search" value="Z39.50 Search" onclick="if (confirm(_('Please note that this Z39.50 search could replace the current record.'))){ PopupZ3950(); } return false;" /></li>[% END %]
     </ul>
 </form>
 </div>
index f934fbe..ee8e9fa 100644 (file)
@@ -767,7 +767,7 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
             type: "button",
             label: _("Z39.50 Search"),
             container: "z3950searchc",
-                       onclick: {fn:function(){PopupZ3950()}}
+            onclick: {fn:function(){if (confirm(_("Please note that this Z39.50 search could replace the current record."))) PopupZ3950()}}
         });
        }