]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
fix bug in arg handling around 'delete' button in directory view
authorrobk-org <robk-org@allmydata.com>
Thu, 12 Jul 2007 23:46:54 +0000 (16:46 -0700)
committerrobk-org <robk-org@allmydata.com>
Thu, 12 Jul 2007 23:46:54 +0000 (16:46 -0700)
the code composing the form providing the 'delete' button in a dir
view was broken in that it tried to put some of the arguments into
the url query, rather than as the form's post args.  worse, nevow
was kind enough to escape the querystring making it invalid.

src/allmydata/webish.py

index 8c13a1b8c0fb23fcef8cced08a741f1d762fff96..168af19e791a0e1e476e8cef4247e2431b65d311 100644 (file)
@@ -74,9 +74,10 @@ class Directory(rend.Page):
             # this creates a button which will cause our child__delete method
             # to be invoked, which deletes the file and then redirects the
             # browser back to this directory
-            del_url = url.here.add("t", "delete").add("name", name)
-            del_url = del_url.add("when_done", url.here)
-            delete = T.form(action=del_url, method="post")[
+            delete = T.form(action=url.here, method="post")[
+                T.input(type='hidden', name='t', value='delete'),
+                T.input(type='hidden', name='name', value=name),
+                T.input(type='hidden', name='when_done', value=url.here),
                 T.input(type='submit', value='del', name="del"),
                 ]
         else: