From: Mark J. Berger Date: Fri, 30 Aug 2013 14:03:58 +0000 (-0400) Subject: Updates webui directory forms X-Git-Tag: allmydata-tahoe-1.10.1a1~151^2~1 X-Git-Url: https://git.rkrishnan.org/simplejson/components/rgr-080307.php?a=commitdiff_plain;h=52859423ba97c079edf24c321f0e5c21eff1b65f;p=tahoe-lafs%2Ftahoe-lafs.git Updates webui directory forms --- diff --git a/src/allmydata/test/test_web.py b/src/allmydata/test/test_web.py index 66e7fd15..52c53b5b 100644 --- a/src/allmydata/test/test_web.py +++ b/src/allmydata/test/test_web.py @@ -1616,7 +1616,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi d.addCallback(lambda res: self.GET(self.public_url + "/foo/empty/")) def _check4(res): self.failUnlessIn("directory is empty", res) - MKDIR_BUTTON_RE=re.compile('.*Create a new directory in this directory.*', re.I) + MKDIR_BUTTON_RE=re.compile('.*Create a new directory in this directory.*', re.I) self.failUnless(MKDIR_BUTTON_RE.search(res), res) d.addCallback(_check4) diff --git a/src/allmydata/web/directory.py b/src/allmydata/web/directory.py index ec170e8b..340591b6 100644 --- a/src/allmydata/web/directory.py +++ b/src/allmydata/web/directory.py @@ -815,11 +815,13 @@ class DirectoryAsHTML(rend.Page): T.input(type="hidden", name="t", value="mkdir"), T.input(type="hidden", name="when_done", value="."), T.legend(class_="freeform-form-label")["Create a new directory in this directory"], - "New directory name:"+SPACE, + "New directory name:"+SPACE, T.br, T.input(type="text", name="name"), SPACE, - T.input(type="submit", value="Create"), SPACE*2, - mkdir_sdmf, T.label(for_='mutable-directory-sdmf')[" SDMF"], SPACE, - mkdir_mdmf, T.label(for_='mutable-directory-mdmf')[" MDMF (experimental)"], + T.div(class_="form-inline")[ + mkdir_sdmf, T.label(for_='mutable-directory-sdmf')[SPACE, "SDMF"], SPACE*2, + mkdir_mdmf, T.label(for_='mutable-directory-mdmf')[SPACE, "MDMF (experimental)"] + ], + T.input(type="submit", class_="btn", value="Create") ]] forms.append(T.div(class_="freeform-form")[mkdir_form]) @@ -839,25 +841,27 @@ class DirectoryAsHTML(rend.Page): T.legend(class_="freeform-form-label")["Upload a file to this directory"], "Choose a file to upload:"+SPACE, T.input(type="file", name="file", class_="freeform-input-file"), SPACE, - T.input(type="submit", value="Upload"), SPACE*2, - 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)"], + T.div(class_="form-inline")[ + upload_chk, T.label(for_="upload-chk") [SPACE, "Immutable"], SPACE*2, + upload_sdmf, T.label(for_="upload-sdmf")[SPACE, "SDMF"], SPACE*2, + upload_mdmf, T.label(for_="upload-mdmf")[SPACE, "MDMF (experimental)"] + ], + T.input(type="submit", class_="btn", value="Upload"), SPACE*2, ]] forms.append(T.div(class_="freeform-form")[upload_form]) attach_form = T.form(action=".", method="post", enctype="multipart/form-data")[ - T.fieldset[ - T.input(type="hidden", name="t", value="uri"), - T.input(type="hidden", name="when_done", value="."), - T.legend(class_="freeform-form-label")["Add a link to a file or directory which is already in Tahoe-LAFS."], - "New child name:"+SPACE, - T.input(type="text", name="name"), SPACE*2, - "URI of new child:"+SPACE, - T.input(type="text", name="uri"), SPACE, - T.input(type="submit", value="Attach"), - ]] + T.fieldset[ T.div(class_="form-inline")[ + T.input(type="hidden", name="t", value="uri"), + T.input(type="hidden", name="when_done", value="."), + T.legend(class_="freeform-form-label")["Add a link to a file or directory which is already in Tahoe-LAFS."], + "New child name:"+SPACE, + T.input(type="text", name="name"), SPACE*2, + "URI of new child:"+SPACE, + T.input(type="text", name="uri"), SPACE, + T.input(type="submit", class_="btn", value="Attach"), + ]]] forms.append(T.div(class_="freeform-form")[attach_form]) return forms