[open-ils-commits] r18029 - in trunk/Open-ILS/web/js: dojo/openils/actor/nls ui/default/actor/user (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Sep 27 12:29:22 EDT 2010


Author: phasefx
Date: 2010-09-27 12:29:19 -0400 (Mon, 27 Sep 2010)
New Revision: 18029

Modified:
   trunk/Open-ILS/web/js/dojo/openils/actor/nls/register.js
   trunk/Open-ILS/web/js/ui/default/actor/user/register.js
Log:
since we're enforcing the requiredness of address type, let's give it a default value (since empty strings don't work with these widgets)


Modified: trunk/Open-ILS/web/js/dojo/openils/actor/nls/register.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/actor/nls/register.js	2010-09-27 16:15:52 UTC (rev 18028)
+++ trunk/Open-ILS/web/js/dojo/openils/actor/nls/register.js	2010-09-27 16:29:19 UTC (rev 18029)
@@ -1,4 +1,5 @@
 {
+    "DEFAULT_ADDRESS_TYPE" : "MAILING",
     "DELETE_ADDRESS" : "Delete address ${0}?",
     "NEED_ADDRESS" : "An address is required during registration.",
     "DUPE_PATRON_NAME" : "Found ${0} patron(s) with the same name",

Modified: trunk/Open-ILS/web/js/ui/default/actor/user/register.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/actor/user/register.js	2010-09-27 16:15:52 UTC (rev 18028)
+++ trunk/Open-ILS/web/js/ui/default/actor/user/register.js	2010-09-27 16:29:19 UTC (rev 18029)
@@ -1213,6 +1213,10 @@
             if(row.getAttribute('fmclass')) {
                 var widget = fleshFMRow(row, 'aua', {addr:id});
 
+                // make new addresses a default address type
+                if(id < 0 && row.getAttribute('fmfield') == 'address_type') 
+                    widget.widget.attr('value', localeStrings.DEFAULT_ADDRESS_TYPE); 
+
                 // make new addresses valid by default
                 if(id < 0 && row.getAttribute('fmfield') == 'valid') 
                     widget.widget.attr('value', true); 



More information about the open-ils-commits mailing list