Post creation. Needs re-think.
[TownSquare.git] / townsquare / templates / post / edit.mako
blobc0e789123b5dbce032fc1341b88faeeaba897018
1 <%inherit file="/base.mako"/>
3 <h1>Create A New Discussion</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.post_id and len(c.post_id):
22     ${h.hidden(name='post_id', value=c.post_id)}
23 % endif
24 % if c.redir and len(c.redir):
25     ${h.hidden(name='success_redirect', value=c.redir)}
26 % endif
27 % if len(c.host_classname) and len(c.host_id):
28     ${h.hidden(name='host_classname', value=c.host_classname)}
29     ${h.hidden(name='host_id', value=c.host_id)}
30 % endif
31   </dd>
32 </dl>
33 ${h.end_form()}
34 </div>