aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/front.t3
-rw-r--r--t/head.t8
-rw-r--r--t/newuser.t35
-rw-r--r--t/post.t2
4 files changed, 47 insertions, 1 deletions
diff --git a/t/front.t b/t/front.t
index 9d39469..2662be2 100644
--- a/t/front.t
+++ b/t/front.t
@@ -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)){
diff --git a/t/head.t b/t/head.t
index d9da813..7962c5b 100644
--- a/t/head.t
+++ b/t/head.t
@@ -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 &rarr;"></p>
+</form>
+<% #include "foot.tc" %> \ No newline at end of file
diff --git a/t/post.t b/t/post.t
index 1e3d360..e30ddbe 100644
--- a/t/post.t
+++ b/t/post.t
@@ -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)); %>