+ T.input(type="submit", value="Download!"),
+ ]]
+ return T.div[form]
+
+ def render_view_form(self, ctx, data):
+ # this is a form where users can download files by URI, or jump to a
+ # named directory
+ form = T.form(action="uri", method="get",
+ enctype="multipart/form-data")[
+ T.fieldset[
+ T.legend(class_="freeform-form-label")["View a file or directory"],
+ "URI to view: ",
+ T.input(type="text", name="uri"), " ",
+ T.input(type="submit", value="View!"),
+ ]]
+ return T.div[form]
+
+ def render_upload_form(self, ctx, data):
+ # this is a form where users can upload unlinked files
+ form = T.form(action="uri", method="post",
+ enctype="multipart/form-data")[
+ T.fieldset[
+ T.legend(class_="freeform-form-label")["Upload a file"],
+ "Choose a file: ",
+ T.input(type="file", name="file", class_="freeform-input-file"),
+ T.input(type="hidden", name="t", value="upload"),
+ T.input(type="submit", value="Upload!"),