[% USE FillInForm %]
[% FILTER fillinform fdat => data || c.req.params %]
<div class='one'>
<form method='post'>
<table align='center'>
<tr class='title'><td colspan='2'>Create a Forum</td></tr>
<tr class='misc1'><td>Forum Code:</td><td><input type='text' name='forum_code' />
[% IF c.form.error('forum_code') %]
[% IF c.form.error('forum_code', 'HAS_BLANK') %]
don't put blank in your forum_code.
[% ELSIF c.form.error('forum_code', 'REGEX') %]
only A-Z, a-z, 0-9, - is allowed. and contain one 'A-Z, a-z' at least
[% ELSIF c.form.error('forum_code', 'HAS_RESERVED') %]
this forum_code is reserved.
[% ELSIF c.form.error('forum_code', 'DBIC_UNIQUE') %]
This forum_code is used by another one.
[% ELSE %]
forum_code should be 6-20 chars.
[% END %]
[% END %]</td></tr>
<tr class='misc1'><td>Forum Name:</td><td><input type='text' name='name' />
[% IF c.form.error('name') %]
the length of forum name should be more than 1 and less than 40
[% END %]</td></tr>
<tr class='misc2'><td>Forum Description</td><td><textarea name='description'></textarea>
[% IF c.form.error('description') %]
<br />description should be 1-200 chars.
[% END %]
</td></tr>
<tr class='misc1'><td>Forum Admin</td><td>
[% IF roles.site.admin %]
<input type='text' name='admin' />
[% IF c.form.error('admin') %]
no such user
[% END %]
[% ELSE %]
[% c.user.username %]
[% END %]
</td></tr>
<tr class='misc2'><td>Forum Moderators</td><td><input type='text' name='moderators' /> use ',' to split if there are more than 1 moderator
[% IF c.form.error('moderators') %]
<br />no such user [% non_existence_user %]
[% END %]
</td></tr>
<tr class='misc1'><td>Policy</td><td><input type='checkbox' name='private' value='1' /> Private</td></tr>
<tr class='misc2'><td colspan='2'><input type='submit' /></td></tr>
</table>
</form>
</div>
[% END %]