( 505, 'UPDATE_WORKSTATION', oils_i18n_gettext(505,
'Allows update of a workstation during workstation registration override.', 'ppl', 'description')),
( 506, 'VIEW_USER_SETTING_TYPE', oils_i18n_gettext(506,
- 'Allows viewing of configurable user setting types.', 'ppl', 'description'));
+ 'Allows viewing of configurable user setting types.', 'ppl', 'description')),
+ ( 509, 'UPDATE_PATRON_COLLECTIONS_EXEMPT', oils_i18n_gettext(509,
+ 'Allows a user to indicate that a patron is exempt from collections processing', 'ppl', 'description'));
SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
'UPDATE_HOLD_REQUEST_TIME',
'UPDATE_NET_ACCESS_LEVEL',
'VIEW_CIRC_MATRIX_MATCHPOINT',
+ 'UPDATE_PATRON_COLLECTIONS_EXEMPT',
'VIEW_HOLD_MATRIX_MATCHPOINT');
INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
dojo.connect(cb, 'onChange', function(newVal) { userSettingsToUpdate[stype.name()] = newVal; });
tbody.insertBefore(row, dividerRow.nextSibling);
openils.Util.show(row, 'table-row');
+
+ if(stype.name() == 'circ.collections.exempt') {
+ checkCollectionsExemptPerm(cb);
+ }
}
function uEditUpdateUserSettings(userId) {
);
}
+var collectExemptCBox;
+function checkCollectionsExemptPerm(cbox) {
+ if(cbox) collectExemptCBox = cbox;
+ new openils.User().getPermOrgList(
+ 'UPDATE_PATRON_COLLECTIONS_EXEMPT',
+ function(orgList) {
+ if(orgList.indexOf(patron.home_ou()) == -1)
+ collectExemptCBox.attr('disabled', true);
+ else
+ collectExemptCBox.attr('disabled', false);
+ },
+ true,
+ true
+ );
+}
+
function attachWidgetEvents(fmcls, fmfield, widget) {
function(newVal) {
checkClaimsReturnCountPerm();
checkClaimsNoCheckoutCountPerm();
+ checkCollectionsExemptPerm();
}
);
return;