From: phasefx Date: Mon, 27 Sep 2010 16:29:50 +0000 (+0000) Subject: since we're enforcing the requiredness of address type, let's give it a default value... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0b50a31315e613f6e7ffe0e522e9badbb811e1a6;p=working%2FEvergreen.git 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) git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@18030 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/actor/nls/register.js b/Open-ILS/web/js/dojo/openils/actor/nls/register.js index 6e0f8af804..5cdc0235b4 100644 --- a/Open-ILS/web/js/dojo/openils/actor/nls/register.js +++ b/Open-ILS/web/js/dojo/openils/actor/nls/register.js @@ -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", 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 cff9071e32..eb53ecd9cf 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -1213,6 +1213,10 @@ function uEditNewAddr(evt, id, mkLinks) { 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); diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 3697f5a99d..f314c5833f 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -2657,7 +2657,7 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che } if (rv == 0) { try { - JSAN.use('util.print'); var print = new util.print(); + JSAN.use('util.print'); var print = new util.print('receipt'); var old_template = String( data.hash.aous['ui.circ.old_harcoded_slip_template'] ) == 'true'; if (old_template) { msg = msg.replace(/&/g, '&').replace(//g, '>').replace(/\n/g,'
'); @@ -2787,7 +2787,7 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che } if (rv == 0) { try { - JSAN.use('util.print'); var print = new util.print(); + JSAN.use('util.print'); var print = new util.print('receipt'); msg = msg.replace(/&/g, '&').replace(//g, '>').replace(/\n/g,'
'); print.simple( msg , { 'no_prompt' : true, 'content_type' : 'text/html' } ); } catch(E) { @@ -2984,7 +2984,7 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che } if (rv == 0) { try { - JSAN.use('util.print'); var print = new util.print(); + JSAN.use('util.print'); var print = new util.print('receipt'); var old_template = String( data.hash.aous['ui.circ.old_harcoded_slip_template'] ) == 'true'; if (old_template) { msg = msg.replace(/&/g, '&').replace(//g, '>').replace(/\n/g,'
');