From 24d711f14e3d8ebcd8de15c1d5e16bc3466fb890 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Sun, 10 May 2015 17:28:28 -0400 Subject: [PATCH] patron reg cont. Signed-off-by: Bill Erickson --- .../src/templates/staff/circ/patron/t_edit.tt2 | 50 ++++++++++++++++++++++ .../web/js/ui/default/staff/circ/patron/regctl.js | 21 ++++++++- 2 files changed, 69 insertions(+), 2 deletions(-) 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 b95af058c7..5c79b58bf5 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 @@ -62,6 +62,31 @@ +
+
+ + +
+
+
+ + +
+
+
+ + [% formfield('au', 'ident_value') %] [% formfield('au', 'ident_value2') %] [% formfield('au', 'email') %] @@ -127,6 +152,31 @@ +
+
+ + +
+
+
+ + +
+
+
+ [% formfield('au', 'active', '', 'checkbox') %] [% formfield('au', 'barred', '', 'checkbox') %] [% formfield('au', 'master_account', '', 'checkbox') %] 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 ce582afe19..1133cc47cd 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 @@ -10,12 +10,25 @@ angular.module('egCoreMod') }; service.init = function(scope) { + // launches a series of parallel data retrieval calls return $q.all([ service.get_field_doc(), - service.get_perm_groups() + service.get_perm_groups(), + service.get_ident_types(), + service.get_net_access_levels() ]); }; + service.get_ident_types = function() { + return egCore.pcrud.retrieveAll('cit', {}, {atomic : true}) + .then(function(types) { service.ident_types = types }); + }; + + service.get_net_access_levels = function() { + return egCore.pcrud.retrieveAll('cnal', {}, {atomic : true}) + .then(function(levels) { service.net_access_levels = levels }); + } + service.get_perm_groups = function() { if (egCore.env.pgt) { service.profiles = egCore.env.pgt.list; @@ -55,7 +68,7 @@ angular.module('egCoreMod') * into the scope. * * 1. Turn everything into a hash - * 2. ... Except certain fields whose widgets require objects + * 2. ... Except certain fields (selectors) whose widgets require objects * 3. Bools must be Boolean, not t/f. */ service.init_existing_patron = function(current) { @@ -65,6 +78,8 @@ angular.module('egCoreMod') patron.home_ou = egCore.org.get(patron.home_ou.id); patron.expire_date = new Date(Date.parse(patron.expire_date)); patron.profile = current.profile(); // pre-hash version + patron.net_access_level = current.net_access_level(); + patron.ident_type = current.ident_type(); angular.forEach( ['juvenile', 'barred', 'active', 'master_account'], @@ -102,6 +117,8 @@ function PatronRegCtrl($scope, $routeParams, $scope.patron = patronRegSvc.init_patron(patronSvc.current); $scope.field_doc = patronRegSvc.field_doc; $scope.profiles = patronRegSvc.profiles; + $scope.ident_types = patronRegSvc.ident_types; + $scope.net_access_levels = patronRegSvc.net_access_levels; }); // returns the tree depth of the selected profile group tree node. -- 2.11.0