[open-ils-commits] r9226 - in
trunk/Open-ILS/xul/staff_client/server: locale/en-US patron
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Apr 4 11:24:54 EDT 2008
Author: phasefx
Date: 2008-04-04 10:48:17 -0400 (Fri, 04 Apr 2008)
New Revision: 9226
Modified:
trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
trunk/Open-ILS/xul/staff_client/server/patron/holds.js
Log:
Forward-port a disallow for editing pickup lib for intransit holds. This may eventually need to become configurable based on policy, in which case we will need to handle the transits involved
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties 2008-04-04 13:17:13 UTC (rev 9225)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties 2008-04-04 14:48:17 UTC (rev 9226)
@@ -332,3 +332,5 @@
staff.circ.holds.unexpected_error.not_likely_modified=Holds not likely modified.
staff.circ.holds.unexpected_error.not_likely_activated=Holds not likely activated.
staff.circ.holds.unexpected_error.not_likely_suspended=Holds not likely suspended.
+staff.circ.holds.error.may_not_edit_pickup_lib_for_hold_intransit=You may not edit the pickup library for holds that are in-transit or ready for pickup.
+
Modified: trunk/Open-ILS/xul/staff_client/server/patron/holds.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/holds.js 2008-04-04 13:17:13 UTC (rev 9225)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds.js 2008-04-04 14:48:17 UTC (rev 9226)
@@ -315,6 +315,17 @@
function() {
try {
JSAN.use('util.widgets'); JSAN.use('util.functional');
+
+ var deny_edit_because_of_transit = false;
+ for (var i = 0; i < obj.retrieve_ids.length; i++) {
+ var hold = obj.holds_map[ obj.retrieve_ids[i].id ];
+ if (hold.status() > 2 /* Which means holds that are In-Transit or Ready for Pickup */) deny_edit_because_of_transit = true;
+ }
+ if (deny_edit_because_of_transit) {
+ alert(document.getElementById('circStrings').getString('staff.circ.holds.error.may_not_edit_pickup_lib_for_hold_intransit'));
+ return;
+ }
+
var list = util.functional.map_list(
obj.data.list.aou,
function(o) {
More information about the open-ils-commits
mailing list