def POST(self): """ """ if self.env["cfg"].enableRequests: tmplid = self.env["members"]["tmplid"] if self.env["members"].has_key("tmplid") else "" if tmplid: sm.setSetting("enableRequests", "tmplid", tmplid) self.session.pushAlert("We've updated the template you're wanting to use to send invites out...", "Got that done...", "success") self.head = ("303 SEE OTHER", [("Location", "/admin/requests")]) else: self._404()
def POST(self): labels = self.env["members"]["addInput"] or "[]" labels = set(json.loads(labels)) try: sm.setSetting("templates", "types", labels) self.session.pushAlert("Template types updated", "Yay", "success") except Exception as exc: self.session.pushAlert("Couldn't set the template types... %s"%exc, "wha'oh", "error") self.head = ("303 SEE OTHER", [("location", "/admin/templates")])