Skip to content

Commit

Permalink
user login: the template (and basic route)
Browse files Browse the repository at this point in the history
  • Loading branch information
garu committed Jun 13, 2010
1 parent b5eede6 commit f73b8f2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tweetylicious.pl
Expand Up @@ -94,6 +94,9 @@ package main;
} => 'join';


# user login
get '/login' => 'login';


# let's rock and roll!
shagadelic;
Expand Down Expand Up @@ -128,6 +131,26 @@ package main;
</body>
</html>
@@ login.html.ep
% layout 'main';
<div id="content" class="full ui-corner-all">
<h1>Sign-in</h1>
% if ( stash 'error' ) {
<div class="ui-state-error ui-corner-all" style="width:466px">
<span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em"></span><strong>Sorry, invalid username/password combination.</strong>
</div>
<p>Not a user yet? <a href="/join">Join now! It's free!</a></p>
<hr />
% }
<form name="login" method="POST" action="/login">
<table>
<tr><td>User name:</td><td><input type="text" tabindex="1" name="username" value="<%= param 'username' %>" /></td></tr>
<tr><td>Password:</td><td><input type="password" tabindex="2" name="password" value="<%= param 'password'%>" /></td></tr>
</table>
<input tabindex="3" type="submit" value="Login!"/>
</form>
</div>
@@ join.html.ep
% layout 'main';
<div id="content" class="full ui-corner-all">
Expand Down

0 comments on commit f73b8f2

Please sign in to comment.