LP1207396 Patron self-registration web form
authorBill Erickson <berick@esilibrary.com>
Tue, 6 Aug 2013 16:25:22 +0000 (12:25 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 6 Aug 2013 16:25:22 +0000 (12:25 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Register.pm
Open-ILS/src/templates/opac/register.tt2

index de7dee7..613cca8 100644 (file)
@@ -38,6 +38,9 @@ sub load_patron_reg {
         $user->$_($val);
     }
 
+    # requestor is logged in, capture who is making this request
+    $user->requesting_usr($ctx->{user}->id) if $ctx->{user};
+
     # make sure the selected home org unit is in the list 
     # of valid orgs.  This can happen if the selector 
     # defaults to CONS, for example.
index f87c6bd..b565bb4 100644 (file)
@@ -74,6 +74,16 @@ register_fields = [
 
         [% ELSE %]
 
+        [% IF ctx.user %]
+            <!-- if the user is logged in, make it 
+                clear we are tracking the requestor -->
+            <h4>[% l('New account requested by ' _ HUMAN_NAME_FORMAT,
+                    ctx.user.prefix, ctx.user.first_given_name,
+                    ctx.user.second_given_name, ctx.user.family_name,
+                    ctx.user.suffix
+                ) | html %]</h4>
+        [% END %]
+
         <form method='POST'>
             <table>
                 <tr>