From 270de201a6479700aff5eaeba701458088605a0c Mon Sep 17 00:00:00 2001 From: Andrew Croce Date: Mon, 23 Jul 2018 14:24:49 -0400 Subject: [PATCH] UI methods for rendering a modal, and dummy function to check if a modal is open --- atst/ui_methods.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/atst/ui_methods.py b/atst/ui_methods.py index e335b941..0d652fbb 100644 --- a/atst/ui_methods.py +++ b/atst/ui_methods.py @@ -5,3 +5,12 @@ def dev(self): def matchesPath(self, href): return self.request.uri.startswith(href) + +def modal(self, body): + return self.render_string( + "components/modal.html.to", + body=body) + +def modalOpen(self): + # For now, just check a dummy URL param + return self.get_argument("modal", False)