${h.form(h.url('create_art'), multipart=True)}
-${normal_field(c.form.by)}
-${normal_field(c.form.file)}
+<div>
+ ${normal_field(c.form.by)}
+ ${checkbox_field(c.form.by_me)}
+</div>
+
+<div>${normal_field(c.form.file)}</div>
##Artist: ${h.text('artist')}
${h.end_form()}
+<%def name="field_errors(errors)">
+ %if errors:
+ <ul class="errors">
+ %for error in errors:
+ <li>${error}
+ %endfor
+ </ul>
+ %endif
+</%def>
+
<%def name="normal_field(field)">
-<div>
-${field.label()|n}
-${field()|n}
-%if field.errors:
-<ul class="errors">
-%for error in field.errors:
-<li>${error}
-%endfor
-</ul>
-%endif
-</div>
+ ${field.label()|n}
+ ${field()|n}
+ ${field_errors(field.errors)}
</%def>
+
+<%def name="checkbox_field(field)">
+ ${field()|n} ${field.label()|n}
+ ${field_errors(field.errors)}
+</%def>
\ No newline at end of file