[open-ils-commits] [GIT] Evergreen ILS branch rel_2_12 updated. 2b94b7b9b4b31a2dfd024dba18edc542c55920e8
Evergreen Git
git at git.evergreen-ils.org
Mon Sep 18 11:47:52 EDT 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_12 has been updated
via 2b94b7b9b4b31a2dfd024dba18edc542c55920e8 (commit)
from 711853d2cad00c73fa5da75fbcaa22abd4975486 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2b94b7b9b4b31a2dfd024dba18edc542c55920e8
Author: Bill Erickson <berickxx at gmail.com>
Date: Thu Sep 14 18:09:08 2017 -0400
LP#1712637 Patron edit hold pickup location repairs
1. Allow setting the hold pickup location independant of the home
library.
2. Disable org units in the pickup lib selector that are not viable hold
pickup locations (can_have_vols=f)
3. Consistent w/ the XUL client, allow a patron to be created without
selecting a default pickup location.
To test:
[1] Register a new patron and confirm pickup location is initialy unset.
[2] Confirm pickup lib options are viable pickup locations.
[3] Apply a pickup location different from the home library and confirm
the home library selector remains unchanged.
[4] Confirm saving the patron applies the expected pickup location value.
Signed-off-by: Bill Erickson <berickxx at gmail.com>
Signed-off-by: Kathy Lussier <klussier at masslnc.org>
diff --git a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
index 76649b7..34a7c2b 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
@@ -579,9 +579,11 @@ within the "form" by name for validation.
<label>{{user_setting_types['opac.default_pickup_location'].label()}}</label>
</div>
<div class="col-md-3 reg-field-input">
- <eg-org-selector
- xonchange="field_modified"
- selected="patron.home_ou"></eg-org-selector>
+ <eg-org-selector nodefault
+ disable-test="disable_pulib"
+ selected="patron._pickup_lib"
+ onchange="handle_pulib_changed">
+ </eg-org-selector>
</div>
</div>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
index d68d950..c54935c 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
@@ -1140,7 +1140,7 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
}
$scope.hold_notify_type.phone = true;
$scope.hold_notify_type.email = true;
- $scope.hold_notify_type.sms = false;
+ $scope.hold_notify_type.sms = false;
// staged users may be loaded w/ a profile.
$scope.set_expire_date();
@@ -1211,6 +1211,13 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
$scope.user_settings = prs.user_settings;
prs.user_settings = {};
+ // If a default pickup lib is applied to the patron, apply it
+ // to the UI at page load time. Otherwise, leave the value unset.
+ if ($scope.user_settings['opac.default_pickup_location']) {
+ $scope.patron._pickup_lib = egCore.org.get(
+ $scope.user_settings['opac.default_pickup_location']);
+ }
+
extract_hold_notify();
if ($scope.patron.isnew)
set_new_patron_defaults(prs);
@@ -1636,6 +1643,11 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
});
}
+ $scope.handle_pulib_changed = function(org) {
+ if (!$scope.user_settings) return; // still rendering
+ $scope.user_settings['opac.default_pickup_location'] = org.id();
+ }
+
// This is called with every character typed in a form field,
// since that's the only way to gaurantee something has changed.
// See handle_field_changed for ng-change vs. ng-blur.
@@ -1767,6 +1779,12 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
);
}
+ // returns true (disable) for orgs that cannot have vols (for holds pickup)
+ $scope.disable_pulib = function(org_id) {
+ if (!org_id) return;
+ return !egCore.org.CanHaveVolumes(org_id);
+ }
+
// Returns true if the Save and Save & Clone buttons should be disabled.
$scope.edit_passthru.hide_save_actions = function() {
return $scope.patron.isnew ?
-----------------------------------------------------------------------
Summary of changes:
.../src/templates/staff/circ/patron/t_edit.tt2 | 8 +++++---
.../web/js/ui/default/staff/circ/patron/regctl.js | 20 +++++++++++++++++++-
2 files changed, 24 insertions(+), 4 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list