From 02d488c4586e2978f9d49f3e03c1237a0eb955a8 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 19 Dec 2012 11:37:56 -0600 Subject: [PATCH] on_failure in grid, fixed issue 1232, thanks dev.ldhughes --- VERSION | 2 +- gluon/sqlhtml.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 76afeb41..66404887 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.3.2 (2012-12-19 11:23:59) dev +Version 2.3.2 (2012-12-19 11:37:10) dev diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index bd3139bc..c25858cc 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -1682,6 +1682,7 @@ class SQLFORM(FORM): maxtextlengths={}, maxtextlength=20, onvalidation=None, + onfailure=None, oncreate=None, onupdate=None, ondelete=None, @@ -1878,6 +1879,7 @@ class SQLFORM(FORM): create_form.process(formname=formname, next=referrer, onvalidation=onvalidation, + onfailure=onfailure, onsuccess=oncreate) res = DIV(buttons(), create_form, formfooter, _class=_class) res.create_form = create_form @@ -1916,6 +1918,7 @@ class SQLFORM(FORM): update_form.process( formname=formname, onvalidation=onvalidation, + onfailure=onfailure, onsuccess=onupdate, next=referrer) res = DIV(buttons(view=details, record=record),