From e717bba50c34ffb72ab5ee6265172e3d85f6cfd2 Mon Sep 17 00:00:00 2001 From: Liam Whalen Date: Fri, 6 Nov 2015 06:51:16 -0800 Subject: [PATCH] LP#ll75400 No Perm message added Added a message to alert the user when they do not have a permission to override an over allocation. Signed-off-by: Liam Whalen --- .../src/templates/acq/funding_source/over_allocate_dialog.tt2 | 9 +++++++++ Open-ILS/web/js/ui/default/acq/financial/view_funding_source.js | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/Open-ILS/src/templates/acq/funding_source/over_allocate_dialog.tt2 b/Open-ILS/src/templates/acq/funding_source/over_allocate_dialog.tt2 index c644c32aa1..82b936dbb3 100644 --- a/Open-ILS/src/templates/acq/funding_source/over_allocate_dialog.tt2 +++ b/Open-ILS/src/templates/acq/funding_source/over_allocate_dialog.tt2 @@ -1,5 +1,6 @@

[% l('You are attempting to allocate more money than is available in the funding source.') %]

+
@@ -11,3 +12,11 @@
+
+

[% l('You do not have permission to override this allocation. You need the ACQ_OVERRIDE_OVER_ALLOCATION permission.') %]

+ +
+ +
+
diff --git a/Open-ILS/web/js/ui/default/acq/financial/view_funding_source.js b/Open-ILS/web/js/ui/default/acq/financial/view_funding_source.js index c505041fc8..e9be908609 100644 --- a/Open-ILS/web/js/ui/default/acq/financial/view_funding_source.js +++ b/Open-ILS/web/js/ui/default/acq/financial/view_funding_source.js @@ -77,10 +77,19 @@ function applyFSAllocation(fields) { ); if(!resp[0]) { doAllocation(fields); + } else { + oilsFSNoPermDialog.show(); } + } ); + dojo.connect(oilsFSNoPermOk, 'onClick', + function() { + oilsFSNoPermDialog.hide(); + } + ); + if(fields.amount > balance) { oilsFSOverAllocateDialog.show(); } else { -- 2.11.0