[open-ils-commits] r11845 - in trunk/Open-ILS/xul/staff_client/server: locale/en-US patron

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Jan 15 11:47:17 EST 2009


Author: erickson
Date: 2009-01-15 11:47:15 -0500 (Thu, 15 Jan 2009)
New Revision: 11845

Modified:
   trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
   trunk/Open-ILS/xul/staff_client/server/patron/ue.xhtml
   trunk/Open-ILS/xul/staff_client/server/patron/ue_config.js
Log:
show the replaced address along with the pending address

Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties	2009-01-15 15:42:50 UTC (rev 11844)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties	2009-01-15 16:47:15 UTC (rev 11845)
@@ -276,3 +276,4 @@
 
 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=<div>Replaces address <b>%1$s</b><br/> %2$s %3$s<br/> %4$s, %5$s %6$s</div>

Modified: trunk/Open-ILS/xul/staff_client/server/patron/ue.xhtml
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/ue.xhtml	2009-01-15 15:42:50 UTC (rev 11844)
+++ trunk/Open-ILS/xul/staff_client/server/patron/ue.xhtml	2009-01-15 16:47:15 UTC (rev 11845)
@@ -554,6 +554,12 @@
 															</div>
 														</td>
 													</tr>
+													<tr class='hide_me' name='ue_addr_replaced_row'>
+														<td colspan='6'>
+															<div class='button_row' name='ue_addr_replaced_div'>
+                                                            </div>
+                                                        </td>
+                                                    </tr>
 												</tbody>
 											</table>
 										</td>

Modified: trunk/Open-ILS/xul/staff_client/server/patron/ue_config.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/ue_config.js	2009-01-15 15:42:50 UTC (rev 11844)
+++ trunk/Open-ILS/xul/staff_client/server/patron/ue_config.js	2009-01-15 16:47:15 UTC (rev 11845)
@@ -640,6 +640,7 @@
 		        );
                 // update the ID on the new address
                 address.id(oldId);
+                address.replaces(null);
                 removeChildren($('ue_address_tbody'));
 	            uEditBuildAddrs(patron);
             }
@@ -694,11 +695,24 @@
     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); 



More information about the open-ils-commits mailing list