On choosing examples, now radio buttons

This commit is contained in:
2020-01-14 21:57:11 +01:00
parent 78f88926ea
commit 0dc849af66
3 changed files with 26 additions and 12 deletions

View File

@@ -5,14 +5,18 @@ from browser import document
def modal_template(content, title, msg):
reset = message.msg(message.ModalNotOkClose())
footer = []
if msg is not None:
footer.append(h("a#modal-ok.button", {"on": {"click": message.msg(msg)}}, "OK"))
footer.append(h("label.button.dangerous", {"on": {"click": reset}}, "Cancel"))
return [
h("header", {}, [
h("h3", {}, title),
h("label.close", {"on": {"click": reset}}, "×")]),
h("section.content", {}, content ),
h("footer", {}, [
h("a.button", {"on": {"click": message.msg(msg)}}, "OK"),
h("label.button.dangerous", {"on": {"click": reset}}, "Cancel")])]
h("footer", {}, footer)]
def question(question, current_value):