From ba2527310866958635d807880d07d8f1b3cb4d0a Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 26 Aug 2014 11:14:33 +0200 Subject: [PATCH] Bug 12823: Alert about defining the SRU search field mappings This is a follow-up for report 6536 (SRU search targets). It will alert a user that saves a SRU server without field mappings. Test plan: Add a Z39.50 server. No confirm message. Add a SRU server without field mappings. Cancel the confirm. Add one field mapping. No confirm message. Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt index 3d7851f573..0ff1b09f37 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt @@ -47,6 +47,10 @@ } }); $("#serverentry").submit(function( event ) { + // first test if show_sru_fields exists + if( $('#show_sru_fields').length && $('#show_sru_fields').val()=='' && !confirm( _("No SRU search field mappings have been defined. This means that all field searches will go through the whole record. Continue?"))) { + return false; + } // copy show_sru_fields to hidden counterpart $('#sru_fields').val( $('#show_sru_fields').val() ); // enable recordtype to include field in post -- 2.39.5