From 44932e4234286d6046c791384e9012225f0403e3 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 11 Feb 2016 10:43:40 +0000 Subject: [PATCH] [SIGNED-OFF] Bug 9021 [QA Followup] - Add additional message to deletion warning if provider is in use. Signed-off-by: Mark Tompsett --- .../intranet-tmpl/prog/en/modules/admin/sms_providers.tt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt index 706db5c..8fbd415 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt @@ -36,8 +36,15 @@ function cancel_edit() { } -function delete_provider( id ) { - if ( confirm( _("Are you sure you want to delete ") + $("#name_" + id).html() + _("?") ) ) { +function delete_provider( id, users ) { + var c; + if ( users ) { + c = confirm( _("Are you sure you want to delete %s? %s patron(s) are using it!").format( $("#name_" + id).html(), users ) ); + } else { + c = confirm( _("Are you sure you want to delete %s?").format( $("#name_" + id).html() ) ); + } + + if ( c ) { $("#op").val('delete'); $("#id").val( id ); $("#sms_form").submit(); @@ -79,7 +86,7 @@ function delete_provider( id ) { [% IF p.patrons_using %] - + Delete [% ELSE %] -- 2.1.4