X-Git-Url: http://git.veekun.com/zzz-floof.git/blobdiff_plain/366dedf71b3cdd775251c7cea4b1519b44b37164..c472ed30b5d4600a8ead8846ddbcbf3bb1b027d6:/floof/templates/art/new.mako?ds=sidebyside diff --git a/floof/templates/art/new.mako b/floof/templates/art/new.mako index 3eda527..684c004 100644 --- a/floof/templates/art/new.mako +++ b/floof/templates/art/new.mako @@ -3,7 +3,42 @@

Add New Art

Now: Upload a file. Later: Supply a link? Not exclusive to uploading.

+## Todo: write some macros to make outputting form fields easier. + ${h.form(h.url('create_art'), multipart=True)} -${h.file('file')} + +
+ ${normal_field(c.form.by)} + ${checkbox_field(c.form.by_me)} +
+ +
${normal_field(c.form.file)}
+ + +##Artist: ${h.text('artist')} +##${h.file('file')} ${h.submit(None, 'Upload!')} ${h.end_form()} + + +<%def name="field_errors(errors)"> + %if errors: + + %endif + + + +<%def name="normal_field(field)"> + ${field.label()|n} + ${field()|n} + ${field_errors(field.errors)} + + +<%def name="checkbox_field(field)"> + ${field()|n} ${field.label()|n} + ${field_errors(field.errors)} + \ No newline at end of file