Only modify msg when needed or we'll get spurious 'stop sign' pages
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 7 Sep 2010 15:24:55 +0000 (15:24 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 7 Sep 2010 15:24:55 +0000 (15:24 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17498 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/display.js

index 744bdb6..dcb398b 100644 (file)
@@ -932,7 +932,7 @@ patron.display.prototype = {
                     }
                 }
                 var penalties = obj.patron.standing_penalties();
-                msg += '<dl>';
+                if (penalties.length > 0) { msg += '<dl>'; }
                 for (var i = 0; i < penalties.length; i++) {
                     if (penalties[i].standing_penalty().block_list() || penalties[i].standing_penalty().id() == 20 /* ALERT_NOTE */) {
                         msg += '<dt>';
@@ -942,7 +942,7 @@ patron.display.prototype = {
                         msg += '</dd>';
                     }
                 }
-                msg += '</dl>';
+                if (penalties.length > 0) { msg += '</dl>'; }
                 var holds = params.holds_summary;
                 if (holds.ready && holds.ready > 0) {
                     msg += $("patronStrings").getFormattedString('staff.patron.display.init.holds_ready', [holds.ready]);