From: erickson Date: Wed, 9 Aug 2006 12:17:19 +0000 (+0000) Subject: alet_message is now required when barred is set to true X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4a1caa31da33464127740cf7095dc40369c2e11c;p=evergreen%2Fpines.git alet_message is now required when barred is set to true git-svn-id: svn://svn.open-ils.org/ILS/trunk@5399 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/patron/ue.xhtml b/Open-ILS/xul/staff_client/server/patron/ue.xhtml index 92388ee6e7..404c1d5a34 100644 --- a/Open-ILS/xul/staff_client/server/patron/ue.xhtml +++ b/Open-ILS/xul/staff_client/server/patron/ue.xhtml @@ -983,6 +983,10 @@ The date provided is either in the future or invalid. We're expecting YYYY-MM-DD + + Please add a note to the patron's alert message explaining why the patron is barred. + + diff --git a/Open-ILS/xul/staff_client/server/patron/ue_config.js b/Open-ILS/xul/staff_client/server/patron/ue_config.js index 8113affe04..e4628a928f 100644 --- a/Open-ILS/xul/staff_client/server/patron/ue_config.js +++ b/Open-ILS/xul/staff_client/server/patron/ue_config.js @@ -47,6 +47,8 @@ const nonumRegex = /^[a-zA-Z]\D*$/; /* no numbers, no beginning whitespace */ const dateRegex = /^\d{4}-\d{2}-\d{2}/; const zipRegex = /^\d{5}(-\d{4}|$)/; /* 12345 or 12345-6789 */ +var barredAlerted = false; + function uEditUsrnameBlur(field) { var usrname = uEditNodeVal(field); @@ -366,6 +368,18 @@ function uEditDefineData(patron) { widget : { id : 'ue_barred', type : 'checkbox', + onpostchange : function(field, val) { + var afield = uEditFindFieldByKey('alert_message'); + if( val ) { + if( !barredAlerted ) { + barredAlerted = true; + alertId('ue_made_barred'); + } + afield.required = true; + } else { + afield.required = false; + } + } } }, {