disable the remove button by default, but always show it
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 9 Dec 2008 06:01:30 +0000 (06:01 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 9 Dec 2008 06:01:30 +0000 (06:01 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11471 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 4bd8c1b..bd200d2 100644 (file)
@@ -111,11 +111,13 @@ patron.summary.prototype = {
                                                                        label.setAttribute('value',penalties[i].standing_penalty().label());
                                                                        row.appendChild(label);
 
+                                                               var button = document.createElement('button');
+                                                               button.setAttribute('label', $("patronStrings").getString('staff.patron.summary.standing_penalty.remove'));
+                                                               button.disabled = true;
+                                                               row.appendChild(button);
+
                                     // XXX check a permission here? How to fire the remove action ??? XXX
-                                    if (penalties[i].standing_penalty().id() >= 100) {
-                                                                       var button = document.createElement('button');
-                                                                       button.setAttribute('label', $("patronStrings").getString('staff.patron.summary.standing_penalty.remove'));
-                                                                       row.appendChild(button);
+                                    if (penalties[i].standing_penalty().id() > 100) {
                                     }
 
                                     if (penalties[i].standing_penalty().block_list().match(/RENEW/)) addCSSClass(label,'PENALTY_RENEW');