]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Updates webui directory forms
authorMark J. Berger <mark.berger.j@gmail.com>
Fri, 30 Aug 2013 14:03:58 +0000 (10:03 -0400)
committerBrian Warner <warner@lothar.com>
Tue, 2 Sep 2014 20:55:13 +0000 (13:55 -0700)
src/allmydata/test/test_web.py
src/allmydata/web/directory.py

index 66e7fd15a230619c61aad46cc744f2bc21fa86ef..52c53b5b3525be0cfbb506724dea0cfb0ecff63f 100644 (file)
@@ -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('<input type="hidden" name="t" value="mkdir" />.*<legend class="freeform-form-label">Create a new directory in this directory</legend>.*<input type="submit" value="Create" />', re.I)
+            MKDIR_BUTTON_RE=re.compile('<input type="hidden" name="t" value="mkdir" />.*<legend class="freeform-form-label">Create a new directory in this directory</legend>.*<input type="submit" class="btn" value="Create" />', re.I)
             self.failUnless(MKDIR_BUTTON_RE.search(res), res)
         d.addCallback(_check4)
 
index ec170e8b2b1abd641682a37079ee806e114b0b41..340591b60afd339e7009c5a173ddf38809cf9af9 100644 (file)
@@ -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