From 87f38a32caf555fb72a8023109e35afae2d0a866 Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 18 Oct 2010 17:44:59 +0000 Subject: [PATCH] stop sign page was incorrectly coming up for all penalties git-svn-id: svn://svn.open-ils.org/ILS/trunk@18380 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/patron/display.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index dcb398bdfe..01804d7fa0 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -932,9 +932,13 @@ patron.display.prototype = { } } var penalties = obj.patron.standing_penalties(); - if (penalties.length > 0) { msg += '
'; } + var dl_flag_opened = false; for (var i = 0; i < penalties.length; i++) { if (penalties[i].standing_penalty().block_list() || penalties[i].standing_penalty().id() == 20 /* ALERT_NOTE */) { + if (!dl_flag_opened) { + msg += '
'; + dl_flag_opened = true; + } msg += '
'; msg += obj.OpenILS.data.hash.aou[ penalties[i].org_unit() ].shortname() + ' : ' + penalties[i].standing_penalty().label() + '
'; msg += '
'; @@ -942,7 +946,7 @@ patron.display.prototype = { msg += '
'; } } - if (penalties.length > 0) { msg += '
'; } + if (dl_flag_opened) { msg += '
'; } var holds = params.holds_summary; if (holds.ready && holds.ready > 0) { msg += $("patronStrings").getFormattedString('staff.patron.display.init.holds_ready', [holds.ready]); -- 2.11.0