[open-ils-commits] r18030 - in branches/rel_2_0/Open-ILS: web/js/dojo/openils/actor/nls web/js/ui/default/actor/user xul/staff_client/server/circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Sep 27 12:29:53 EDT 2010
Author: phasefx
Date: 2010-09-27 12:29:50 -0400 (Mon, 27 Sep 2010)
New Revision: 18030
Modified:
branches/rel_2_0/Open-ILS/web/js/dojo/openils/actor/nls/register.js
branches/rel_2_0/Open-ILS/web/js/ui/default/actor/user/register.js
branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/util.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: branches/rel_2_0/Open-ILS/web/js/dojo/openils/actor/nls/register.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/openils/actor/nls/register.js 2010-09-27 16:29:19 UTC (rev 18029)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/actor/nls/register.js 2010-09-27 16:29:50 UTC (rev 18030)
@@ -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: branches/rel_2_0/Open-ILS/web/js/ui/default/actor/user/register.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/ui/default/actor/user/register.js 2010-09-27 16:29:19 UTC (rev 18029)
+++ branches/rel_2_0/Open-ILS/web/js/ui/default/actor/user/register.js 2010-09-27 16:29:50 UTC (rev 18030)
@@ -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);
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/util.js 2010-09-27 16:29:19 UTC (rev 18029)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/util.js 2010-09-27 16:29:50 UTC (rev 18030)
@@ -2657,7 +2657,7 @@
}
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(/>/g, '>').replace(/\n/g,'<br/>');
@@ -2787,7 +2787,7 @@
}
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(/>/g, '>').replace(/\n/g,'<br/>');
print.simple( msg , { 'no_prompt' : true, 'content_type' : 'text/html' } );
} catch(E) {
@@ -2984,7 +2984,7 @@
}
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(/>/g, '>').replace(/\n/g,'<br/>');
More information about the open-ils-commits
mailing list