[open-ils-commits] [GIT] Evergreen ILS branch master updated. a0c569a4401f81a19022e0368369149d827ac18e

Evergreen Git git at git.evergreen-ils.org
Wed Nov 8 09:30:04 EST 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, master has been updated
       via  a0c569a4401f81a19022e0368369149d827ac18e (commit)
      from  cfb7979c77c1d5184fc2b3660580022c8cbdd98d (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 a0c569a4401f81a19022e0368369149d827ac18e
Author: Jason Boyer <JBoyer at library.in.gov>
Date:   Wed Oct 18 22:05:05 2017 -0500

    LP1724725: Handle ident_type2 in Web Staff User Editor
    
    While it was fairly harmless to not be able to set an ident_type2
    value in the webstaff editor, the way things worked out if a user
    had one set from the XUL client or direct manipulation an attempt
    to save such a user would crash the cstore backend.
    
    To test
    -------
    [1] Use the patron editor to edit a patron that has a value set
        for ident_value2. Save a change, but note that nothing is
        displayed and that eventually an open-ils.cstore error is
        reported in the browser console.
    [2] Apply the patch and repeat step 1. This time, the patron
        editor will display the secondary identification type field
        and allow you to save changes to the record.
    
    Signed-off-by: Jason Boyer <JBoyer at library.in.gov>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.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 23977d9..ce8da85 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
@@ -317,6 +317,21 @@ within the "form" by name for validation.
   </div>
 </div>
 
+<!-- ident_type2 -->
+
+<div class="row reg-field-row" ng-show="show_field('au.ident_type2')">
+  [% draw_field_label('au', 'ident_type2') %]
+  <div class="col-md-3 reg-field-input">
+    <select 
+      class="form-control" 
+      ng-model="patron.ident_type2"
+      ng-required="field_required('au', 'ident_type2')"
+      ng-blur="handle_field_changed(patron, 'ident_type2')"
+      ng-options="type.name() for type in ident_types track by type.id()">
+    </select>
+  </div>
+</div>
+
 <!-- IDENT_VALUE2 -->
 <div class="row reg-field-row" ng-show="show_field('au.ident_value2')">
   [% draw_field_label('au', 'ident_value2') %]
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 861488d..adf5c71 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
@@ -639,6 +639,7 @@ angular.module('egCoreMod')
         patron.profile = current.profile(); // pre-hash version
         patron.net_access_level = current.net_access_level();
         patron.ident_type = current.ident_type();
+        patron.ident_type2 = current.ident_type2();
         patron.groups = current.groups(); // pre-hash
 
         angular.forEach(
@@ -755,6 +756,8 @@ angular.module('egCoreMod')
         if (user.profile) user.profile = egCore.env.pgt.map[user.profile];
         if (user.ident_type) 
             user.ident_type = egCore.env.cit.map[user.ident_type];
+        if (user.ident_type2)
+            user.ident_type2 = egCore.env.cit.map[user.ident_type2];
         user.dob = service.parse_dob(user.dob);
 
         // Clear the usrname if it looks like a UUID
@@ -1286,6 +1289,7 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
         'au.first_given_name' : 3,
         'au.family_name' : 3,
         'au.ident_type' : 3,
+        'au.ident_type2' : 2,
         'au.home_ou' : 3,
         'au.profile' : 3,
         'au.expire_date' : 3,

-----------------------------------------------------------------------

Summary of changes:
 .../src/templates/staff/circ/patron/t_edit.tt2     |   15 +++++++++++++++
 .../web/js/ui/default/staff/circ/patron/regctl.js  |    4 ++++
 2 files changed, 19 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list