diff options
Diffstat (limited to 't')
-rw-r--r-- | t/front.t | 3 | ||||
-rw-r--r-- | t/head.t | 8 | ||||
-rw-r--r-- | t/newuser.t | 35 | ||||
-rw-r--r-- | t/post.t | 2 |
4 files changed, 47 insertions, 1 deletions
@@ -1,5 +1,8 @@ <% #include "head.tc" %> <h1><%= site.name %></h1> +<ul> + <li><a href="?new=user">Sign up</a></li> +</ul> <h3>Latest posts</h3> <table border="1"> <% while(post = nextpost(pstmt)){ @@ -3,5 +3,13 @@ <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <title><%= title %></title> +<style type="text/css"> + form.hlite-confirm #confirm, + form.hlite-name #name, + form.hlite-full #full, + form.hlite-pass #pass { + background: #f66; + } +</style> </head> <body>
\ No newline at end of file diff --git a/t/newuser.t b/t/newuser.t new file mode 100644 index 0000000..a0a0dd9 --- /dev/null +++ b/t/newuser.t @@ -0,0 +1,35 @@ +<% #include "head.tc" %> +<h1>New User</h1> +<% if(*msg){ %> +<p style="color: red;"><%= msg %></p> +<% } %> +<form class="<% if(hlite) printf("hlite-%s", hlite); %>" action="?new=user" method="POST"> + <table border="0"> + <tr id="name"> + <td><label for="name">Username</label></td> + <td><input type="text" name="name" value="<% if(name) printf("%s", name); %>"></td> + </tr> + <tr id="full"> + <td><label for="full">Full Name</label></td> + <td><input type="text" name="full" value="<% if(full) printf("%s", full); %>"></td> + <td><small>(optional)</small></td> + </tr> + <tr id="pass"> + <td><label for="pass">Password</label></td> + <td><input type="password" name="pass" value=""></td> + </tr> + <tr id="confirm"> + <td><label for="confirm">Confirm</label></td> + <td><input type="password" name="confirm" value=""></td> + </tr> + </table> + <p>By clicking <i>Create</i>, you confirm</p> + <ol> + <li>that this user is a real human,</li> + <li>that you will not abuse the service,</li> + <li>that the information you provide will be saved on the server, and</li> + <li>that your user may be terminated by an administrator at any point and for any reason.</li> + </ol> + <p><input type="submit" value="Create →"></p> +</form> +<% #include "foot.tc" %>
\ No newline at end of file @@ -20,7 +20,7 @@ <tr> <td><a href="?att=<% printf("%d", att->id); %>"><%= att->name %></a></td> <td><%= att->mime %></td> - <td><%= att->description %></td> + <td><%= att->desc %></td> </tr> <% free(att); }while(att = nextatt(stmt)); %> |