From 693d68b64746ffd5569d32f2524e3587792908a1 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 21 Jun 2018 11:11:54 -0400 Subject: [PATCH] Bug 20977: Javascript vars used in confirm_deletion in catalog.js do not match strings in catalog-strings.inc The naming mismatch can cause javascript errors. Test Plan: 1) Confirm the string vars used in catalog.js match the ones in catalog-strings.inc Signed-off-by: Pierre-Luc Lapointe Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/en/includes/catalog-strings.inc | 6 +++--- koha-tmpl/intranet-tmpl/prog/js/catalog.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc index 5e92ac0624..86502efeeb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc @@ -2,10 +2,10 @@ /* Strings for translation */ var MSG_REPLACE_RECORD = _("Please note that this external search could replace the current record."); var MSG_DELETE_ALL_ITEMS = _("%s item(s) are attached to this record. You must delete all items before deleting this record."); - var CONFIRM_USED_IN_ORDERS = _("Warning: This record is used in %s order(s). Deleting it could cause serious issues on acquisition module. Are you sure you want to delete this record?"); - var MSG_USED_IN_ORDERS = _("%s order(s) are using this record. You need order managing permissions to delete this record."); + var CONFIRM_RECORD_USED_IN_ORDERS = _("Warning: This record is used in %s order(s). Deleting it could cause serious issues on acquisition module. Are you sure you want to delete this record?"); + var MSG_RECORD_USED_IN_ORDERS = _("%s order(s) are using this record. You need order managing permissions to delete this record."); var CONFIRM_IN_DELETED_ORDERS = _("%s deleted order(s) are using this record. Are you sure you want to delete this record?"); - var MSG_IN_DELTED_ORDERS = _("%s deleted order(s) are using this record. You need order managing permissions to delete this record."); + var MSG_IN_DELETED_ORDERS = _("%s deleted order(s) are using this record. You need order managing permissions to delete this record."); var CONFIRM_DELETION_HOLDS = _("%s holds(s) for this record. Are you sure you want to delete this record?"); var CONFIRM_RECORD_DELETION = _("Are you sure you want to delete this record?"); var MSG_DELETE_ALL_HOLDS = _("%s hold(s) on this record. You must delete all holds before deleting all items."); diff --git a/koha-tmpl/intranet-tmpl/prog/js/catalog.js b/koha-tmpl/intranet-tmpl/prog/js/catalog.js index 19ccd522e2..2fba833108 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/catalog.js +++ b/koha-tmpl/intranet-tmpl/prog/js/catalog.js @@ -35,7 +35,7 @@ function confirm_deletion() { if( order_manage_permission ){ is_confirmed = confirm( CONFIRM_IN_DELETED_ORDERS.format(countdeletedorders) ); } else { - is_confirmed = alert( MSG_IN_DELTED_ORDERS.format(countdeletedorders) ); + is_confirmed = alert( MSG_IN_DELETED_ORDERS.format(countdeletedorders) ); } } else if ( holdcount > 0 ) { is_confirmed = confirm( CONFIRM_DELETION_HOLDS.format(holdcount) ); -- 2.39.5