From 10983e79bc6a62070d7b2954f1c3e793a24609fc Mon Sep 17 00:00:00 2001 From: helmutm Date: Mon, 25 Feb 2008 10:18:13 +0000 Subject: [PATCH] work in progress: form/field validation on dialogs git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2417 fd906abe-77d9-0310-91a1-e0d9ade77398 --- browser/form.py | 3 +-- browser/form_macros.pt | 1 + browser/loops.js | 24 ++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/browser/form.py b/browser/form.py index cae6b05..62e8b1b 100644 --- a/browser/form.py +++ b/browser/form.py @@ -79,8 +79,7 @@ class ObjectForm(NodeView): def closeAction(self, submit=False): if self.isInnerHtml: - return ("closeDataWidget(%s); dialog.hide();" % - (submit and 'true' or 'false')) + return "return closeDialog(%s);" % (submit and 'true' or 'false') if submit: return "xhrSubmitPopup('dialog_form', '%s'); return false" % (self.request.URL) return 'window.close()' diff --git a/browser/form_macros.pt b/browser/form_macros.pt index 1cd0d86..5779aba 100644 --- a/browser/form_macros.pt +++ b/browser/form_macros.pt @@ -4,6 +4,7 @@