install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0044'); -- berick
+INSERT INTO config.upgrade_log (version) VALUES ('0045'); -- berick
CREATE TABLE config.bib_source (
(346,'UPDATE_BILL_NOTE', oils_i18n_gettext(346,'Allows staff to edit the note for a bill on a transaction', 'ppl', 'description')),
(347,'UPDATE_PAYMENT_NOTE', oils_i18n_gettext(347,'Allows staff to edit the note for a payment on a transaction', 'ppl', 'description')),
- (348, 'UPDATE_RECORD', oils_i18n_gettext(348, 'Allow a user to update and undelete records.', 'ppl', 'description'));
+ (348, 'UPDATE_RECORD', oils_i18n_gettext(348, 'Allow a user to update and undelete records.', 'ppl', 'description')),
+ (349, 'UPDATE_PATRON_CLAIM_NEVER_CHECKED_OUT_COUNT', oils_i18n_gettext(349,'Allows staff to manually change a patron''s claims never checkout out count', 'ppl', 'description'));
SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
--- /dev/null
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0045');
+
+INSERT INTO permission.perm_list
+ VALUES (
+ 349,
+ 'UPDATE_PATRON_CLAIM_NEVER_CHECKED_OUT_COUNT',
+ oils_i18n_gettext(349,'Allows staff to manually change a patron''s claims never checkout out count', 'ppl', 'description')
+ );
+
+COMMIT;
+
var cgi;
var cloneUser;
var cloneUserObj;
-var claimReturnedPermList;
if(!window.xulG) var xulG = null;
loadStatCats();
loadSurveys();
checkClaimsReturnCountPerm();
+ checkClaimsNoCheckoutCountPerm();
}
/*
);
}
+
+function checkClaimsNoCheckoutCountPerm() {
+ new openils.User().getPermOrgList(
+ 'UPDATE_PATRON_CLAIM_NEVER_CHECKED_OUT_COUNT',
+ function(orgList) {
+ var cr = findWidget('au', 'claims_never_checked_out_count');
+ if(orgList.indexOf(patron.home_ou()) == -1)
+ cr.widget.attr('disabled', true);
+ else
+ cr.widget.attr('disabled', false);
+ },
+ true,
+ true
+ );
+}
+
+
function attachWidgetEvents(fmcls, fmfield, widget) {
if(fmcls == 'ac') {
case 'home_ou':
dojo.connect(widget.widget, 'onChange',
- function(newVal) { checkClaimsReturnCountPerm(); });
+ function(newVal) {
+ checkClaimsReturnCountPerm();
+ checkClaimsNoCheckoutCountPerm();
+ }
+ );
return;
}
<tr fmclass='au' fmfield='barred'/>
<tr fmclass='au' fmfield='master_account'/>
<tr fmclass='au' fmfield='claims_returned_count' wclass='dijit.form.NumberSpinner' wconstraints="{min:0,places:0}" wvalue='0'/>
+ <tr fmclass='au' fmfield='claims_never_checked_out_count' wclass='dijit.form.NumberSpinner' wconstraints="{min:0,places:0}" wvalue='0'/>
<tr fmclass='au' fmfield='alert_message' wclass='dijit.form.Textarea' wstyle='height:5em'/>
<tr class='divider hidden' id='uedit-settings-divider'><td colspan='0'>User Settings</td></tr>