From fbb73c7bcbcb32ec20ca828d1ba4154e045a762e Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 12 Sep 2013 11:55:36 +0300 Subject: [PATCH] Fix some javascript errors, trying to access nonexistent widgets Signed-off-by: Pasi Kallinen Signed-off-by: Melissa Ceraso Signed-off-by: Ben Shum --- Open-ILS/web/js/ui/default/actor/user/register.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js index 629b18c795..671502a7a2 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -1197,6 +1197,7 @@ function checkClaimsReturnCountPerm() { 'UPDATE_PATRON_CLAIM_RETURN_COUNT', function(orgList) { var cr = findWidget('au', 'claims_returned_count'); + if (!cr) return; if(orgList.indexOf(patron.home_ou()) == -1) cr.widget.attr('disabled', true); else @@ -1213,6 +1214,7 @@ function checkClaimsNoCheckoutCountPerm() { 'UPDATE_PATRON_CLAIM_NEVER_CHECKED_OUT_COUNT', function(orgList) { var cr = findWidget('au', 'claims_never_checked_out_count'); + if (!cr) return; if(orgList.indexOf(patron.home_ou()) == -1) cr.widget.attr('disabled', true); else @@ -1229,6 +1231,7 @@ function checkCollectionsExemptPerm(cbox) { new openils.User().getPermOrgList( 'UPDATE_PATRON_COLLECTIONS_EXEMPT', function(orgList) { + if (!collectExemptCBox) return; if(orgList.indexOf(patron.home_ou()) == -1) collectExemptCBox.attr('disabled', true); else -- 2.11.0