mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-01 00:45:52 +00:00
wui/wapi/webish: HTML form checkboxes send the value "on", so let's interpret that as boolean true
This commit is contained in:
parent
99f006c584
commit
30c9b21d6b
@ -33,8 +33,8 @@ class ILocalAccess(Interface):
|
||||
can talk to the webserver control over the local (disk) filesystem."""
|
||||
|
||||
def boolean_of_arg(arg):
|
||||
assert arg.lower() in ("true", "t", "1", "false", "f", "0")
|
||||
return arg.lower() in ("true", "t", "1")
|
||||
assert arg.lower() in ("true", "t", "1", "false", "f", "0", "on", "off")
|
||||
return arg.lower() in ("true", "t", "1", "on")
|
||||
|
||||
def get_arg(req, argname, default=None, multiple=False):
|
||||
"""Extract an argument from either the query args (req.args) or the form
|
||||
|
Loading…
x
Reference in New Issue
Block a user