Permalink
Browse files

user login: the template (and basic route)

  • Loading branch information...
1 parent b5eede6 commit f73b8f2d0452832f4cb8d206d3a7a3e05bc8faad @garu committed Jun 13, 2010
Showing with 23 additions and 0 deletions.
  1. +23 −0 tweetylicious.pl
View
@@ -94,6 +94,9 @@ package main;
} => 'join';
+# user login
+get '/login' => 'login';
+
# let's rock and roll!
shagadelic;
@@ -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">

0 comments on commit f73b8f2

Please sign in to comment.