Added a message to alert the user when they do not have a permission to
override an over allocation.
Signed-off-by: Liam Whalen <liam.whalen@bc.libraries.coop>
<div dojoType="dijit.Dialog" jsId='oilsFSOverAllocateDialog' style='display:none;'>
<p>[% l('You are attempting to allocate more money than is available in the funding source.') %]</p>
+ <table><tr>
<td>
<button jsId='oilsFSOverAllocateContinue'
dojoType='dijit.form.Button'>[% l('Ok') %]</button>
</tr></table>
</div>
+<div dojoType="dijit.Dialog" jsId='oilsFSNoPermDialog' style='display:none;'>
+ <p>[% l('You do not have permission to override this allocation. You need the ACQ_OVERRIDE_OVER_ALLOCATION permission.') %]</p>
+ <table><td>
+ <button jsId='oilsFSNoPermOk'
+ dojoType='dijit.form.Button'>[% l('Ok') %]</button>
+ </td>
+ </tr></table>
+</div>
);
if(!resp[0]) {
doAllocation(fields);
+ } else {
+ oilsFSNoPermDialog.show();
}
+
}
);
+ dojo.connect(oilsFSNoPermOk, 'onClick',
+ function() {
+ oilsFSNoPermDialog.hide();
+ }
+ );
+
if(fields.amount > balance) {
oilsFSOverAllocateDialog.show();
} else {