$e->authtoken, $email);
my $url = $self->apache->unparsed_uri;
- $url =~ s/update_email/main/;
+ $url =~ s/update_email/prefs/;
return $self->generic_redirect($url);
}
.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;}
+
[%
IF hold.hold.status == 4;
l("Available");
- ELSIF hold.hold.estimated_wait;
- l("Estimated wait (days): ");
- hold.hold.estimated_wait;
+ ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
+ # estimated wait is delivered as seconds.
+ SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
+ l("Estimated wait: [quant,_1,day,days]", hwait);
ELSIF hold.hold.status == 3;
l("In Transit");
ELSIF hold.hold.status < 3;
</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'>
--- /dev/null
+[% 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 %]
USE date;
USE CGI = CGI_utf8;
USE EGI18N;
+ USE POSIX;
SET DATE_FORMAT = l('%m/%d/%Y');
# Don't wrap in l() here; do that where this format string is actually used.