Cleaned up websetup a little.
[zzz-floof.git] / floof / templates / art / new.mako
1 <%inherit file="/base.mako" />
2
3 <h1>Add New Art</h1>
4 ${h.form(h.url('create_art'), multipart=True)}
5
6 ##<<<<<<< HEAD
7 ##<div>
8 ##    ${normal_field(c.form.by)}
9 ##    ${checkbox_field(c.form.by_me)}
10 ##</div>
11 ##
12 ##<div>${normal_field(c.form.file)}</div>
13 ##=======
14 ## Todo: write some macros to make outputting form fields easier.
15 ${normal_field(c.form.file)}
16 ##>>>>>>> origin/master
17
18 ${h.submit(None, 'Upload!')}
19 ${h.end_form()}
20
21
22 <%def name="field_errors(errors)">
23     %if errors:
24     <ul class="errors">
25         %for error in errors:
26             <li>${error}
27         %endfor
28     </ul>
29     %endif
30 </%def>
31
32
33 <%def name="normal_field(field)">
34     ${field.label()|n}
35     ${field()|n}
36     ${field_errors(field.errors)}
37 </%def>
38
39 <%def name="checkbox_field(field)">
40     ${field()|n} ${field.label()|n}
41     ${field_errors(field.errors)}
42 </%def>