refactoring archive_list action
[blog.pm.git] / templates / src / comment / form.tt2
blobf76ab93368443ffb307ae21ffcd01629616e2100
1 [% PROCESS 'macro/form' %]
3 [% IF user_exists && !user_is_admin %]
5 [% openid = c.parse_openid(c.user.url) %]
6 <img src="/static/images/[% openid.type || "openid" %].png" alt="OpenID"
7 class="middle" />
8 [% openid.name %]
9 (<a href="[% base %]/user/logout">[% c.loc('Logout') %]</a>)
10 [% ELSIF !user_exists %]
11 <img src="/static/images/openid.png" alt="OpenID"
12 style="vertical-align:middle" /> <a href="[%
13 base %]/login_openid">[% c.loc('Login with OpenID') %]</a>
14 [% END %]
16 <div class="form" id="form">
17 [% form_start(action='/comment/add') %]
19 [% form_hidden(name="post_id", value="$post.id") %]
21 [% form_textarea(name='content') %]
23 [% UNLESS user_exists %]
24 [% form_text(name="name",label=c.loc('Name')) %]
25 [% form_text(name="email",label='E-mail',desc=c.loc("Won't be published")) %]
26 [% END %]
28 [% form_submit(name="submit",value=c.loc('Add')) %]
30 [% form_end %]
31 </div>