[open-ils-commits] r14541 - in trunk/Open-ILS: src/sql/Pg src/sql/Pg/upgrade web/js/ui/default/actor/user web/templates/default/actor/user (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Oct 21 16:03:57 EDT 2009
Author: erickson
Date: 2009-10-21 16:03:51 -0400 (Wed, 21 Oct 2009)
New Revision: 14541
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0045.data.patron-claim-never-checkout-out-perm.sql
Modified:
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
trunk/Open-ILS/web/js/ui/default/actor/user/register.js
trunk/Open-ILS/web/templates/default/actor/user/register.tt2
Log:
added claims never checked out field to patron editor along with associated permission for changing the value
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-10-21 19:08:43 UTC (rev 14540)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-10-21 20:03:51 UTC (rev 14541)
@@ -51,7 +51,7 @@
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 (
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-10-21 19:08:43 UTC (rev 14540)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-10-21 20:03:51 UTC (rev 14541)
@@ -1228,7 +1228,8 @@
(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);
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0045.data.patron-claim-never-checkout-out-perm.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0045.data.patron-claim-never-checkout-out-perm.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0045.data.patron-claim-never-checkout-out-perm.sql 2009-10-21 20:03:51 UTC (rev 14541)
@@ -0,0 +1,13 @@
+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;
+
Modified: trunk/Open-ILS/web/js/ui/default/actor/user/register.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/actor/user/register.js 2009-10-21 19:08:43 UTC (rev 14540)
+++ trunk/Open-ILS/web/js/ui/default/actor/user/register.js 2009-10-21 20:03:51 UTC (rev 14541)
@@ -39,7 +39,6 @@
var cgi;
var cloneUser;
var cloneUserObj;
-var claimReturnedPermList;
if(!window.xulG) var xulG = null;
@@ -111,6 +110,7 @@
loadStatCats();
loadSurveys();
checkClaimsReturnCountPerm();
+ checkClaimsNoCheckoutCountPerm();
}
/*
@@ -381,6 +381,23 @@
);
}
+
+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') {
@@ -462,7 +479,11 @@
case 'home_ou':
dojo.connect(widget.widget, 'onChange',
- function(newVal) { checkClaimsReturnCountPerm(); });
+ function(newVal) {
+ checkClaimsReturnCountPerm();
+ checkClaimsNoCheckoutCountPerm();
+ }
+ );
return;
}
Modified: trunk/Open-ILS/web/templates/default/actor/user/register.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/actor/user/register.tt2 2009-10-21 19:08:43 UTC (rev 14540)
+++ trunk/Open-ILS/web/templates/default/actor/user/register.tt2 2009-10-21 20:03:51 UTC (rev 14541)
@@ -113,6 +113,7 @@
<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>
More information about the open-ils-commits
mailing list