chiark / gitweb /
found
[nj-awaymsg.git] / mason / txtable
diff --git a/mason/txtable b/mason/txtable
new file mode 100644 (file)
index 0000000..b2bdc72
--- /dev/null
@@ -0,0 +1,31 @@
+
+<%args>
+$tx
+$inputs => 0
+</%args>
+
+% my $ent = sub {
+%     my ($head,$name,$val,$style,$size,$input_xinfo) = @_;
+<tr><td><% $head %></td>
+<td>
+%     if ($inputs) {
+%         $size ||= 70;
+<input type="text" size="<% $size %>" name="<% $name %>" value="<% $val |h %>">
+<% $input_xinfo %>
+%     } else {
+%         if (defined $style) {
+<% "<$style>" %>
+%         }
+<% $val |h %>
+%         if (defined $style) {
+<% "</$style>" %>
+%         }
+%     }
+% };
+
+<table>
+% $ent->('Short name:', 'desc', $tx->{'desc'});
+<% $m->content %>
+% $ent->('Subject:', 'subject', $tx->{'subject'}, 'code');
+</table>
+<p>