From 6758a00c1ca8475d907787b34155d1058286c3e5 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 29 Nov 2010 17:42:15 +0000 Subject: [PATCH] Patch (trunk-ified) from Jeff Godin: In the staff client, the holds context menu option "Edit PickupLibrary" displays and allows selection of org units that it shouldn't. Org units whose type has can_have_users = FALSE are not valid pickup locations. Using the default types as an example, CONS and SYS1 are invalid pickup locations. The OPAC enforces this when allowing patrons to edit a hold. The staff client does not enforce this when staff edit a hold. The can_have_users() method of the au object returns a string 't' or 'f' which is then compared to 0. The attached patch corrects this issue. ( foo == 0 becomes !isTrue(foo) ). git-svn-id: svn://svn.open-ils.org/ILS/trunk@18854 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/patron/holds.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index 3adaa9414..816cdcf4e 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -472,7 +472,7 @@ patron.holds.prototype = { return [ o.name() ? sname + ' ' + o.name() : o.shortname(), o.id(), - ( obj.data.hash.aout[ o.ou_type() ].can_have_users() == 0), + ( !isTrue(obj.data.hash.aout[ o.ou_type() ].can_have_users()) ), ( obj.data.hash.aout[ o.ou_type() ].depth() * 2), ]; } -- 2.11.0