integrated update-email address action into account prefs
authorberick <berick@esilibrary.com>
Mon, 14 Mar 2011 21:46:13 +0000 (17:46 -0400)
committerberick <berick@esilibrary.com>
Mon, 14 Mar 2011 21:46:13 +0000 (17:46 -0400)
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/prefs.tt2
Open-ILS/web/templates/default/opac/myopac/update_email.tt2 [new file with mode: 0644]

index 54c1803..e92a4bd 100644 (file)
@@ -480,7 +480,7 @@ sub load_myopac_update_email {
         $e->authtoken, $email);
 
     my $url = $self->apache->unparsed_uri;
-    $url =~ s/update_email/main/;
+    $url =~ s/update_email/prefs/;
 
     return $self->generic_redirect($url);
 }
index d095b1d..ce35479 100644 (file)
@@ -950,3 +950,8 @@ div.select-wrapper:hover {
 .subtle-button:hover { text-decoration: underline; cursor: pointer; }
 .no-dec:hover { text-decoration: none; }
 .pending-addr td { background-color: #ffcccc !important; border: 0 !important; }
+
+#account-update-email table { text-align: center; padding: 20px; margin-top: 30px; border-collapse: collapse; }
+#account-update-email table td { padding: 5px 15px 5px 15px; border-bottom: 1px solid #ddd; text-align: left;}
+#account-update-email-error { font-size: 1.5em; padding: 10px; border:1px solid #e9ebf3;}
+
index ebfbebd..bb62854 100644 (file)
                     </tr>
 
                     <tr>
-                        <td class='color_4 light_border'>
-                        [% l("Email Address") %]</td>
-
+                        <td class='color_4 light_border'>[% l("Email Address") %]</td>
                         <td class='light_border'>[% ctx.user.email | html %]</td>
-
-                        <td class='light_border'><a href='#'
-                           class="hide_me"
-                           style='text-decoration: underline;'>[% l("Change") %]</a></td>
+                        <td class='light_border'><a href='update_email'>[% l('Change') %]</a></td>
                     </tr>
 
                     <tr class='hide_me'>
diff --git a/Open-ILS/web/templates/default/opac/myopac/update_email.tt2 b/Open-ILS/web/templates/default/opac/myopac/update_email.tt2
new file mode 100644 (file)
index 0000000..22b089a
--- /dev/null
@@ -0,0 +1,24 @@
+[%  PROCESS "default/opac/parts/header.tt2";
+    PROCESS "default/opac/parts/marc_misc.tt2";
+    WRAPPER "default/opac/parts/base.tt2" +
+        "default/opac/parts/myopac/base.tt2";
+    myopac_page = "update_email"  %]
+<div id='myopac_summary_div' style="padding:0px;">
+
+[% IF ctx.invalid_email %]
+    <div id='account-update-email-error'>
+        [% | l(ctx.invalid_email) %]
+        The email address "<b>[_1]</b>" is invalid.  Please try a different email address.
+        [% END %]
+    </div>
+[% END %]
+
+<form method='POST' id='account-update-email'>
+    <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>
+        <tr><td colspan='2' align='center'><input type='submit'/></td></tr>
+    </table>
+</form>
+
+[% END %]