From: erickson Date: Thu, 15 Jan 2009 16:47:15 +0000 (+0000) Subject: show the replaced address along with the pending address X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1b03e2aa806be48634aaf8ae5b902bfeffa1af79;p=Evergreen.git show the replaced address along with the pending address git-svn-id: svn://svn.open-ils.org/ILS/trunk@11845 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties b/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties index 6c5df62d7f..385a63770f 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties @@ -276,3 +276,4 @@ staff.patron.usr_buckets.merge_records.catch.std_unex_error=Records were not lik web.staff.patron.ue.session_no_defined=User session is not defined web.staff.patron.ue.uedit_show_search.search_would_be=Search would be:\n%1$s +web.staff.patron.ue.uedit_show_addr_replacement=
Replaces address %1$s
%2$s %3$s
%4$s, %5$s %6$s
diff --git a/Open-ILS/xul/staff_client/server/patron/ue.xhtml b/Open-ILS/xul/staff_client/server/patron/ue.xhtml index 05e5454716..9b102cd779 100644 --- a/Open-ILS/xul/staff_client/server/patron/ue.xhtml +++ b/Open-ILS/xul/staff_client/server/patron/ue.xhtml @@ -554,6 +554,12 @@ + + +
+
+ + 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 ebfb3c2201..5cdb247199 100644 --- a/Open-ILS/xul/staff_client/server/patron/ue_config.js +++ b/Open-ILS/xul/staff_client/server/patron/ue_config.js @@ -640,6 +640,7 @@ function uEditApproveAddr( tbody, row, address ) { ); // update the ID on the new address address.id(oldId); + address.replaces(null); removeChildren($('ue_address_tbody')); uEditBuildAddrs(patron); } @@ -694,11 +695,24 @@ function uEditBuildAddrFields(patron, address) { if( address.replaces() != null ) { var button = $n(row, 'ue_addr_approve'); unHideMe(button); - button.onclick = - function() { uEditApproveAddr( tbody, row, address ); } + button.onclick = function() { uEditApproveAddr( tbody, row, address ); } + var oldaddr = grep(patron.addresses(), function(a){return (a.id() == address.replaces());}); + if(oldaddr) { + oldaddr = oldaddr[0]; + unHideMe($n(row, 'ue_addr_replaced_row')); + $n(row, 'ue_addr_replaced_div').innerHTML = + $("patronStrings").getFormattedString( + 'web.staff.patron.ue.uedit_show_addr_replacement', [ + oldaddr.address_type(), + oldaddr.street1(), + oldaddr.street2(), + oldaddr.city(), + oldaddr.state(), + oldaddr.post_code() + ]); + } } - $n(row, 'ue_addr_delete').onclick = function() { uEditDeleteAddr(tbody, row, address);