From ced34fb5c3329dc34591cf7465e61d78f8a90b5e Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Wed, 14 Dec 2016 13:26:06 -0800 Subject: [PATCH] LP#1526185 Operator Change Service Move operator change functionality into its own dedicated service. Notify user when action fails due to unauthorized credentials, complete with message as to what has gone wrong. Fire off any failed action after input of authorized credentials. Signed-off-by: Kyle Huckins Signed-off-by: Bill Erickson Signed-off-by: Kathy Lussier --- Open-ILS/src/templates/staff/base_js.tt2 | 3 + .../src/templates/staff/share/t_opchange.tt2 | 9 ++- Open-ILS/web/js/ui/default/staff/Gruntfile.js | 1 + .../js/ui/default/staff/circ/services/circ.js | 14 ---- .../js/ui/default/staff/services/navbar.js | 36 ++------- .../js/ui/default/staff/services/op_change.js | 76 +++++++++++++++++++ .../js/ui/default/staff/test/karma.conf.js | 1 + 7 files changed, 93 insertions(+), 47 deletions(-) create mode 100644 Open-ILS/web/js/ui/default/staff/services/op_change.js diff --git a/Open-ILS/src/templates/staff/base_js.tt2 b/Open-ILS/src/templates/staff/base_js.tt2 index 224ae0f137..d75c3c5d0c 100644 --- a/Open-ILS/src/templates/staff/base_js.tt2 +++ b/Open-ILS/src/templates/staff/base_js.tt2 @@ -44,6 +44,7 @@ + [% ELSE %] @@ -82,6 +83,8 @@ s.EG_CONFIRM_DELETE_RECORD_BODY = "[% l('Delete record {{id}}?') %]"; s.OP_CHANGE_SUCCESS = "[% l('Operator Change Succeeded') %]"; s.OP_CHANGE_FAILURE = "[% l('Operator Change Failed') %]"; + s.OP_CHANGE_TITLE = "[% l('Operator Change') %]"; + s.OP_CHANGE_PERM_MESSAGE = "[% l('Another staff member with the above permission may authorize this specific action. Please notify your library administrator if you need this permission. If you feel you have received this exception in error, please inform your friendly Evergreen developers or helpdesk staff of the above permission.') %]"; }]); diff --git a/Open-ILS/src/templates/staff/share/t_opchange.tt2 b/Open-ILS/src/templates/staff/share/t_opchange.tt2 index 3872441c84..2ca7fbe787 100644 --- a/Open-ILS/src/templates/staff/share/t_opchange.tt2 +++ b/Open-ILS/src/templates/staff/share/t_opchange.tt2 @@ -5,9 +5,14 @@