From 531bfc856894177942c335ad8605210700274b99 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 17 Sep 2015 09:40:46 +0100 Subject: [PATCH] Bug 14805: QA follow-up This patches remove a trailing whitespace and simplify 2 parts of code. Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/patroncards/manage.tt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt index 40ea92b07f..50b5200e57 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt @@ -22,16 +22,14 @@ function DeleteConfirm() { var element_ids = selected_layouts("delete"); - var answer; + var msg; if (element_ids.length > 1) { - var msg = _("Are you sure you want to delete %s batches?").format(element_ids.length); - answer = confirm(msg); + msg = _("Are you sure you want to delete %s batches?").format(element_ids.length); } else if (element_ids.length == 1) { - var msg = _("Are you sure you want to delete %s %s?").format("[% PROCESS translate_card_element element=card_element %]", element_ids[0]); - answer = confirm(msg); + msg = _("Are you sure you want to delete %s %s?").format("[% PROCESS translate_card_element element=card_element %]", element_ids[0]); } - if (answer) { + if (msg && confirm(msg)) { var elements = ""; for (var i = 0; i < element_ids.length; i++) { if (element_ids[i] > -1) { @@ -105,11 +103,10 @@ else if (selected.length < 1) { if (op == "edit") { alert(_("Please select one %s to %s.").format("[% PROCESS translate_card_element element=card_element %]", op)); - return (-1); } else { alert(_("Please select at least one %s to %s.").format("[% PROCESS translate_card_element element=card_element %]", op)); - return (-1); } + return (-1); } else { alert(_("Please select only one %s to %s.").format("[% PROCESS translate_card_element element=card_element %]", op)); -- 2.39.5