Give the patrons the opportunity to see and change their e-mail address...
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 26 Jul 2011 18:46:18 +0000 (14:46 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 28 Jul 2011 16:18:45 +0000 (12:18 -0400)
... before they submit fine payments.  This way they have a better
chance of getting a receipt e-mailed to them.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/web/css/skin/default/opac/style.css
Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2
Open-ILS/web/templates/default/opac/myopac/main_payments.tt2
Open-ILS/web/templates/default/opac/myopac/update_email.tt2

index d1c1658..0001958 100644 (file)
@@ -1026,10 +1026,14 @@ sub load_myopac_update_email {
         'open-ils.actor.user.email.update', 
         $e->authtoken, $email);
 
-    my $url = $self->apache->unparsed_uri;
-    $url =~ s/update_email/prefs/;
+    unless ($self->cgi->param("redirect_to")) {
+        my $url = $self->apache->unparsed_uri;
+        $url =~ s/update_email/prefs/;
 
-    return $self->generic_redirect($url);
+        return $self->generic_redirect($url);
+    }
+
+    return $self->generic_redirect;
 }
 
 sub load_myopac_update_username {
index cf2088b..f3078fe 100644 (file)
@@ -876,10 +876,11 @@ div.select-wrapper:hover {
     padding-right: 5px;
 }
 
-#myopac_payments_table th { text-align: left; }
-#myopac_payments_table tbody tr:nth-child(odd) { background-color: #ddd; }
-#myopac_payments_table form { display: inline; }
-#myopac_payments_table input[type="submit"] { padding: 1px; }
+.myopac_payments_table th { text-align: left; }
+.myopac_payments_table thead th { border-bottom: 1px dashed #333; }
+.myopac_payments_table tbody tr:nth-child(odd) { background-color: #ddd; }
+.myopac_payments_table form { display: inline; }
+.myopac_payments_table input[type="submit"] { padding: 1px; }
 
 .payment-error {
     font-weight: bold; color: red;
index f5345d5..edc012e 100644 (file)
@@ -24,8 +24,8 @@
                 <tr>
                     <td colspan='2'><strong>[% l('Billing Information') %]</strong></td>
                     <td rowspan='13' valign='top'>
-                        [% l('Selected fines you are paying for:') %]
-                        <table cellpadding="0" cellspacing="5" border="0">
+                        <p>[% l('Selected fines you are paying for:') %]</p>
+                        <table cellpadding="0" cellspacing="0" border="0" class="myopac_payments_table">
                             <thead>
                                 <tr>
                                     <th>[% l('Name') %]</th>
                     <td><input type="text" name="billing_last" value="[% ctx.user.family_name | html %]" /></td>
                 </tr>
                 <tr>
+                    <td>[% l('Email Address') %]</td>
+                    <td>
+                        <input type="text" disabled="disabled" readonly="readonly" value="[% ctx.user.email | html %]" />
+                        <a href="[% ctx.opac_root %]/myopac/update_email?return_to_referer=1">[% l("Update") %]</a>
+                    </td>
+                </tr>
+                <tr>
                     <td>[% l('Street Address') %]</td>
                     <td><input type="text" name="billing_address" value="[% ctx.user.billing_address.street1 _ ctx.user.billing_address.street2 | html %]" /></td>
                 </tr>
index 7e1e44b..0a3b192 100644 (file)
@@ -21,7 +21,7 @@
     <div class="clear-both"></div>
 
     [% IF ctx.payments.size %]
-    <table id='myopac_payments_table' width='100%' class='data_grid'>
+    <table class='myopac_payments_table data_grid' width='100%'>
         <thead><tr>
             <th>[% l('Payment Date') %]</th>
             <th>[% l('Payment For') %]</th>
index 2261c29..a6e62ec 100644 (file)
@@ -13,6 +13,9 @@
 [% END %]
 
 <form method='POST' id='account-update-email'>
+    [% IF CGI.param("return_to_referer") %]
+    <input type="hidden" name="redirect_to" value="[% ctx.referer | html %]" />
+    [% END %]
     <table> 
         <tr><td>[% l('Current Email') %]</td><td>[% ctx.user.email | html %]</td></tr>
         <tr><td>[% l('New Email') %]</td><td><input type='text' name='email' value='[% ctx.invalid_email | html %]'/></td></tr>