mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-03-31 07:46:17 +00:00
Remove unused renderers
This commit is contained in:
parent
88b7784f39
commit
cce6f83054
@ -531,81 +531,6 @@ class RootElement(Element):
|
||||
|
||||
return tag
|
||||
|
||||
def render_download_form(self, ctx, data):
|
||||
# this is a form where users can download files by URI
|
||||
form = T.form(action="uri", method="get",
|
||||
enctype="multipart/form-data")[
|
||||
T.fieldset[
|
||||
T.legend(class_="freeform-form-label")["Download a file"],
|
||||
T.div["Tahoe-URI to download:"+SPACE,
|
||||
T.input(type="text", name="uri")],
|
||||
T.div["Filename to download as:"+SPACE,
|
||||
T.input(type="text", name="filename")],
|
||||
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"],
|
||||
"Tahoe-URI to view:"+SPACE,
|
||||
T.input(type="text", name="uri"), SPACE*2,
|
||||
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.
|
||||
# Users can choose immutable, SDMF, or MDMF from a radio button.
|
||||
|
||||
upload_chk = T.input(type='radio', name='format',
|
||||
value='chk', id='upload-chk',
|
||||
checked='checked')
|
||||
upload_sdmf = T.input(type='radio', name='format',
|
||||
value='sdmf', id='upload-sdmf')
|
||||
upload_mdmf = T.input(type='radio', name='format',
|
||||
value='mdmf', id='upload-mdmf')
|
||||
|
||||
form = T.form(action="uri", method="post",
|
||||
enctype="multipart/form-data")[
|
||||
T.fieldset[
|
||||
T.legend(class_="freeform-form-label")["Upload a file"],
|
||||
T.div["Choose a file:"+SPACE,
|
||||
T.input(type="file", name="file", class_="freeform-input-file")],
|
||||
T.input(type="hidden", name="t", value="upload"),
|
||||
T.div[upload_chk, T.label(for_="upload-chk") [" Immutable"], SPACE,
|
||||
upload_sdmf, T.label(for_="upload-sdmf")[" SDMF"], SPACE,
|
||||
upload_mdmf, T.label(for_="upload-mdmf")[" MDMF (experimental)"], SPACE*2,
|
||||
T.input(type="submit", value="Upload!")],
|
||||
]]
|
||||
return T.div[form]
|
||||
|
||||
def render_mkdir_form(self, ctx, data):
|
||||
# This is a form where users can create new directories.
|
||||
# Users can choose SDMF or MDMF from a radio button.
|
||||
|
||||
mkdir_sdmf = T.input(type='radio', name='format',
|
||||
value='sdmf', id='mkdir-sdmf',
|
||||
checked='checked')
|
||||
mkdir_mdmf = T.input(type='radio', name='format',
|
||||
value='mdmf', id='mkdir-mdmf')
|
||||
|
||||
form = T.form(action="uri", method="post",
|
||||
enctype="multipart/form-data")[
|
||||
T.fieldset[
|
||||
T.legend(class_="freeform-form-label")["Create a directory"],
|
||||
mkdir_sdmf, T.label(for_='mkdir-sdmf')[" SDMF"], SPACE,
|
||||
mkdir_mdmf, T.label(for_='mkdir-mdmf')[" MDMF (experimental)"], SPACE*2,
|
||||
T.input(type="hidden", name="t", value="mkdir"),
|
||||
T.input(type="hidden", name="redirect_to_result", value="true"),
|
||||
T.input(type="submit", value="Create a directory"),
|
||||
]]
|
||||
return T.div[form]
|
||||
|
||||
@renderer
|
||||
def incident_button(self, req, tag):
|
||||
# this button triggers a foolscap-logging "incident"
|
||||
|
Loading…
x
Reference in New Issue
Block a user