Introduced post types.
[TownSquare.git] / townsquare / templates / post / edit.mako
blobce940b6a4386af1cf3244ca4386ef97e806621e8
1 <%inherit file="/base.mako"/>
3 <h1>Post</h1>
5 <div>
6 ${h.secure_form(url(''))}
7 <dl>
8 % if c.new_post or (c.title and len(c.title)):
9   <dt>Title</dt>
10   <dd>
11     ${h.text(name='title', value=c.title, maxLength=255)}
12   </dd>
13 % endif
14   <dt>Content</dt>
15   <dd>
16     ${h.textarea(name='content', rows=7, cols=40, content=c.content)} <br />
17   </dd>
18   <dt>&nbsp;</dt>
19   <dd>
20     ${h.submit(value='Save changes', name='commit')}
21 % if c.content_type and len(c.content_type):
22     ${h.hidden(name='content_type', value=c.content_type)}
23 % endif
24 % if c.post_id and len(c.post_id):
25     ${h.hidden(name='post_id', value=c.post_id)}
26 % endif
27 % if c.redir and len(c.redir):
28     ${h.hidden(name='success_redirect', value=c.redir)}
29 % endif
30 % if len(c.host_classname) and len(c.host_id):
31     ${h.hidden(name='host_classname', value=c.host_classname)}
32     ${h.hidden(name='host_id', value=c.host_id)}
33 % endif
34   </dd>
35 </dl>
36 ${h.end_form()}
37 </div>