mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 21:43:09 +00:00
webish: fix overwrite form display
This commit is contained in:
parent
53e865cf49
commit
51af1fa2e3
@ -948,8 +948,9 @@ class Web(WebMixin, unittest.TestCase):
|
||||
self.GET(self.public_url + "/foo",
|
||||
followRedirect=True))
|
||||
def _check_page(res):
|
||||
# TODO: assert something about the contents
|
||||
pass
|
||||
# TODO: assert more about the contents
|
||||
self.failUnless("Overwrite" in res)
|
||||
self.failUnless("Choose new file:" in res)
|
||||
d.addCallback(_check_page)
|
||||
|
||||
return d
|
||||
|
@ -40,7 +40,7 @@
|
||||
<td><n:slot name="size"/></td>
|
||||
<td><n:slot name="data"/></td>
|
||||
<td><n:slot name="delete"/></td>
|
||||
<td><div n:render="overwrite"/></td>
|
||||
<td><n:slot name="overwrite"/></td>
|
||||
<td><n:slot name="rename"/></td>
|
||||
|
||||
<td><n:slot name="check"/></td>
|
||||
|
@ -176,6 +176,7 @@ class Directory(rend.Page):
|
||||
T.input(type='hidden', name='when_done', value=url.here),
|
||||
T.input(type='submit', value='check', name="check"),
|
||||
]
|
||||
ctx.fillSlots("overwrite", self.build_overwrite(ctx, (name, target)))
|
||||
ctx.fillSlots("check", check)
|
||||
|
||||
# build the base of the uri_link link url
|
||||
@ -331,7 +332,7 @@ class Directory(rend.Page):
|
||||
T.div(class_="freeform-form")[mount],
|
||||
]
|
||||
|
||||
def render_overwrite(self, ctx, data):
|
||||
def build_overwrite(self, ctx, data):
|
||||
name, target = data
|
||||
if IMutableFileNode.providedBy(target) and not target.is_readonly():
|
||||
overwrite = T.form(action=".", method="post",
|
||||
|
Loading…
Reference in New Issue
Block a user