Add the ability to quickly delete a couple of stuff
This commit is contained in:
@@ -3,13 +3,17 @@ from lib.snabbdom import h
|
||||
from model.tags import TAGS
|
||||
from browser import document
|
||||
|
||||
def modal_template(content, title, msg):
|
||||
def modal_template(content, title, msg, delete_msg=None):
|
||||
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"))
|
||||
if delete_msg is not None:
|
||||
footer.append(h("label.button.warning.modal-delete", {"on": {"click": message.msg(delete_msg)}}, "🗑"))
|
||||
|
||||
return [
|
||||
h("header", {}, [
|
||||
|
||||
Reference in New Issue
Block a user