Fix url params for checkboxes when re-opening an input form

Thanks to Rotzbua for pointing the issue out!
This commit is contained in:
Florian Festi 2018-08-16 08:54:52 +02:00
parent 4916118b8b
commit 46175dde11
1 changed files with 2 additions and 0 deletions

View File

@ -196,6 +196,8 @@ class BoolArg:
return True
def html(self, name, default):
if isinstance(default, (str)):
default = self(default)
return """<input name="%s" type="hidden" value="0">
<input name="%s" type="checkbox" value="1"%s>""" % \
(name, name, ' checked="checked"' if default else "")