2017-01-15 16:27:22 +01:00
|
|
|
% for ( $retry_msg // () ) {
|
|
|
|
% $_ = $_ eq 'authfailure' ? "Authentication failed: User does not exist "
|
|
|
|
% . "or the password was wrong."
|
|
|
|
% : $_ eq 'loggedOut' ? "You have been logged out. All session cookies "
|
|
|
|
% . "are expired and deleted. If you want to re-login:"
|
|
|
|
% : undef;
|
|
|
|
% }
|
|
|
|
% title 'User login';
|
|
|
|
|
|
|
|
% if ( $retry_msg ) {
|
|
|
|
<p class="error"><%= $retry_msg %></p>
|
|
|
|
% }
|
|
|
|
<form method="post" action="/login"><p>
|
|
|
|
|
2017-02-02 22:23:23 +01:00
|
|
|
<dl>
|
|
|
|
<dt>User id</dt>
|
|
|
|
<dd><input name="user" type="text" placeholder="user id or email" value="<%= param('user') %>"></dd>
|
|
|
|
<dt>Password</dt>
|
|
|
|
<dd><input name="password" type="password"></dd>
|
2017-01-28 14:00:20 +01:00
|
|
|
% if ( my $token = param 'token' ) {
|
2017-02-02 22:23:23 +01:00
|
|
|
<dt>Repeat</dt>
|
|
|
|
<dd><input name="samepassword" type="password">
|
|
|
|
<input type="hidden" name="token" value="<%= $token %>">
|
|
|
|
</dd>
|
2017-01-28 14:00:20 +01:00
|
|
|
% }
|
2017-02-02 22:23:23 +01:00
|
|
|
<p><button type="submit">Login</button></p>
|
2017-01-15 16:27:22 +01:00
|
|
|
|
2017-02-02 22:23:23 +01:00
|
|
|
</form>
|