]> Dogcows Code - chaz/chatty/blobdiff - root/tt/login.tt
switch to FormHandler for validation
[chaz/chatty] / root / tt / login.tt
index d2b70e2dceb25c4079e342ddda45e10bbbb77836..3720e2611122f7c388e1fd3c5856a8cf2c07a8bd 100644 (file)
@@ -1,13 +1,27 @@
-<h1>Log In</h1>
-[% IF ! c.user_exists %]
+[% META title = 'Log In' -%]
+<h2>Log In</h2>
+[% IF ! c.user_exists -%]
+<!--
 <form action="[% c.uri_for('login')  %]" method="post">
 <form action="[% c.uri_for('login')  %]" method="post">
-       <label for="handle">Username</label>
-       <input type="text" name="handle" id="handle">
-       <label for="password">Password</label>
-       <input type="password" name="password" id="password">
-       <input type="submit" value="Login">
+       <fieldset>
+               <p>
+                       <label for="handle">Username</label>
+                       <input type="text" name="handle" id="handle">
+               </p>
+               <p>
+                       <label for="password">Password</label>
+                       <input type="password" name="password" id="password">
+               </p>
+               <input type="submit" value="Login">
+       </fieldset>
 </form>
 </form>
-[% ELSE %]
+-->
+[% form.render %]
+<h3>Register</h3>
+<p>
+If you don't already have an account, <a href="[% c.uri_for('register') %]">go register</a>!
+</p>
+[% ELSE -%]
 <p>You are already logged in.</p>
 <a href="[% c.uri_for('logout') %]">Log Out</a>
 <p>You are already logged in.</p>
 <a href="[% c.uri_for('logout') %]">Log Out</a>
-[% END %]
+[% END -%]
This page took 0.020391 seconds and 4 git commands to generate.