From 1cbb09f1d1a074cb57e139787d53aa22ee95e4dd Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 4 Dec 2006 22:00:47 +0000 Subject: [PATCH] MDL-7778 fixed cancel button failing on some pages (I hope) --- lib/form/cancel.php | 2 +- lib/formslib.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/form/cancel.php b/lib/form/cancel.php index d8e4876d77..88ca84e3ab 100644 --- a/lib/form/cancel.php +++ b/lib/form/cancel.php @@ -27,7 +27,7 @@ class MoodleQuickForm_cancel extends HTML_QuickForm_submit $value=get_string('cancel'); } HTML_QuickForm_submit::HTML_QuickForm_submit($elementName, $value, $attributes); - $this->updateAttributes(array('onclick'=>'return this.form.submit();')); + $this->updateAttributes(array('onclick'=>'skipClientValidation = true; return true;')); } //end constructor function onQuickFormEvent($event, $arg, &$caller) { diff --git a/lib/formslib.php b/lib/formslib.php index 0947dc64a5..57a7a5cf33 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -733,6 +733,9 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless { $js = '