From: Bill Erickson Date: Tue, 19 May 2015 13:35:04 +0000 (-0400) Subject: patron reg cont. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c25e10e42142714cdf134a2f7e1013b262114122;p=working%2FEvergreen.git patron reg cont. Signed-off-by: Bill Erickson --- 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 5262fc3c74..a7eace332a 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 @@ -2,7 +2,7 @@
[% l('Patron Edit') %]
- +
{{idl_fields[selected_field_doc.fm_class()][selected_field_doc.field()].label}} @@ -12,14 +12,14 @@ [% MACRO formfield(cls, field, path, input_type) BLOCK; - # input field generator for text/number/checkbox fields + # input field generator for common text/number/checkbox fields IF NOT input_type; input_type = 'text'; END %]
-
- +
+ @@ -27,8 +27,8 @@ ng-click="selected_field_doc=field_doc.[% cls %].[% field %]" src='[% DOC_IMG %]'>
-
- + +
[% model = path ? 'patron.' _ path _ '.' _ field : 'patron.' _ field; @@ -57,7 +57,20 @@ [% formfield('au', 'family_name') %] [% formfield('au', 'suffix') %] [% formfield('au', 'alias') %] -[% formfield('au', 'dob') %] + +
+
+ + +
+
+ +
+
+ [% formfield('au', 'juvenile', '', 'checkbox') %] @@ -184,7 +197,10 @@ [% formfield('au', 'claims_never_checked_out_count', '', 'number') %] [% formfield('au', 'alert_message') %] - + +
@@ -216,33 +232,20 @@
- +
-
-
+
+
+ [% l('Phone') %]
-
-
- -
-
- -
-
-
+
+ [% l('Email') %]
-
-
- -
-
- -
-
-
+
+ [% l('SMS') %]
@@ -278,33 +281,88 @@
+ + +[% formfield('aua', 'address_type', 'mailing_address') %] +[% formfield('aua', 'post_code', 'mailing_address') %] +[% formfield('aua', 'street1', 'mailing_address') %] +[% formfield('aua', 'street2', 'mailing_address') %] +[% formfield('aua', 'city', 'mailing_address') %] +[% formfield('aua', 'county', 'mailing_address') %] +[% formfield('aua', 'state', 'mailing_address') %] +[% formfield('aua', 'country', 'mailing_address') %] +[% formfield('aua', 'valid', 'mailing_address', 'checkbox') %] +[% formfield('aua', 'within_city_limits', 'mailing_address', 'checkbox') %] + - -
+ + +
- +
- -
- +
+
- -
- - +
+
+ + +
+ + + +
+
+ +
+
+
+ + +
+
+
+ + + diff --git a/Open-ILS/src/templates/staff/css/circ.css.tt2 b/Open-ILS/src/templates/staff/css/circ.css.tt2 index 6ffc40733d..30134bcbd4 100644 --- a/Open-ILS/src/templates/staff/css/circ.css.tt2 +++ b/Open-ILS/src/templates/staff/css/circ.css.tt2 @@ -59,14 +59,18 @@ but the ones I'm finding aren't quite cutting it..*/ /* make all input widgets the same width, i.e. fill their column */ .reg-field-input input:not([type="checkbox"]) { width: 100%; } -.reg-field-input > .eg-org-selector, -.reg-field-input > .eg-org-selector button, -.reg-field-input > .btn-group, -.reg-field-input > .btn-group > button { +.reg-field-input .eg-org-selector, +.reg-field-input .btn-group { width: 100%; text-align: left; } +.reg-field-input .eg-org-selector button, +.reg-field-input .btn-group > button { + width: 100%; + text-align: right; +} + /* floating div along top-right with field documentation */ /* TODO: make this part of the floatin save/clone 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 0816062a49..1d5fc4e45d 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 @@ -22,10 +22,23 @@ angular.module('egCoreMod') service.get_user_settings(), service.get_org_settings(), service.get_stat_cats(), + service.get_surveys(), service.get_net_access_levels() ]); }; + service.get_surveys = function() { + var org_ids = egCore.org.ancestors(egCore.auth.user().ws_ou(), true); + + return egCore.pcrud.search('asv', + {owner : org_ids}, + {flesh : 1, flesh_fields : {asv : ['questions']}}, + {atomic : true} + ).then(function(surveys) { + service.surveys = surveys; + }); + } + service.get_stat_cats = function() { return egCore.net.request( 'open-ils.circ', @@ -255,6 +268,7 @@ angular.module('egCoreMod') patron.home_ou = egCore.org.get(patron.home_ou.id); patron.expire_date = new Date(Date.parse(patron.expire_date)); + patron.dob = new Date(Date.parse(patron.dob)); patron.profile = current.profile(); // pre-hash version patron.net_access_level = current.net_access_level(); patron.ident_type = current.ident_type(); @@ -264,6 +278,11 @@ angular.module('egCoreMod') function(field) { patron[field] = patron[field] == 't'; } ); + angular.forEach(patron.addresses, function(addr) { + addr.valid = addr.valid == 't'; + addr.within_city_limits = addr.within_city_limits == 't'; + }); + return patron; } @@ -306,6 +325,7 @@ function PatronRegCtrl($scope, $routeParams, $scope.org_settings = prs.org_settings; $scope.sms_carriers = prs.sms_carriers; $scope.stat_cats = prs.stat_cats; + $scope.surveys = prs.surveys; }); // returns the tree depth of the selected profile group tree node.