From 1fbaa1dde02d7461ffceea542bec7deafd2a99fc Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Wed, 19 Oct 2016 11:59:57 -0700 Subject: [PATCH] LP1537214 Staff Initials in Patron Notes Add Initials field to new note dialog when Require Staff Initials option is active. Notes with initials will use the following format: "Note [Initials]" Signed-off-by: Kyle Huckins Changes to be committed: modified: Open-ILS/src/templates/staff/circ/patron/t_new_note_dialog.tt2 modified: Open-ILS/web/js/ui/default/staff/circ/patron/app.js Signed-off-by: Kathy Lussier --- .../src/templates/staff/circ/patron/t_new_note_dialog.tt2 | 5 +++++ Open-ILS/web/js/ui/default/staff/circ/patron/app.js | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/staff/circ/patron/t_new_note_dialog.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_new_note_dialog.tt2 index cfc5b4081d..6e9919a872 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_new_note_dialog.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_new_note_dialog.tt2 @@ -35,6 +35,11 @@ diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js index 356bdfebe2..31b23582b2 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js @@ -29,6 +29,7 @@ angular.module('egPatronApp', ['ngRoute', 'ui.bootstrap', // specific settings from within their respective controllers egCore.env.classLoaders.aous = function() { return egCore.org.settings([ + 'ui.staff.require_initials.patron_info_notes', 'circ.do_not_tally_claims_returned', 'circ.tally_lost', 'circ.obscure_dob', @@ -1312,8 +1313,8 @@ function($scope, $routeParams , $location , egCore , patronSvc) { }]) .controller('PatronNotesCtrl', - ['$scope','$routeParams','$location','egCore','patronSvc','$uibModal', -function($scope, $routeParams , $location , egCore , patronSvc , $uibModal) { + ['$scope', '$filter', '$routeParams','$location','egCore','patronSvc','$uibModal', +function($scope, $filter, $routeParams , $location , egCore , patronSvc , $uibModal) { $scope.initTab('other', $routeParams.id); var usr_id = $routeParams.id; @@ -1338,6 +1339,7 @@ function($scope, $routeParams , $location , egCore , patronSvc , $uibModal) { function($scope, $uibModalInstance) { $scope.focusNote = true; $scope.args = {}; + $scope.require_initials = egCore.env.aous['ui.staff.require_initials.patron_info_notes']; $scope.ok = function(count) { $uibModalInstance.close($scope.args) } $scope.cancel = function () { $uibModalInstance.dismiss() } }], @@ -1350,6 +1352,8 @@ function($scope, $routeParams , $location , egCore , patronSvc , $uibModal) { note.value(args.value); note.pub(args.pub ? 't' : 'f'); note.creator(egCore.auth.user().id()); + if (args.initials) + note.value(note.value() + ' [' + args.initials + ']'); egCore.pcrud.create(note).then(function() {refreshPage()}); } ); -- 2.43.2