diff --git a/etemplate/inc/class.etemplate_new.inc.php b/etemplate/inc/class.etemplate_new.inc.php index 4139f6aaf5..bffb603bcd 100644 --- a/etemplate/inc/class.etemplate_new.inc.php +++ b/etemplate/inc/class.etemplate_new.inc.php @@ -241,8 +241,13 @@ class etemplate_new extends etemplate_widget_template /** * Process via Ajax submitted content + * + * @param string $etemplate_exec_id + * @param array $content + * @param boolean $no_validation + * @throws egw_exception_wrong_parameter */ - static public function ajax_process_content($etemplate_exec_id, array $content) + static public function ajax_process_content($etemplate_exec_id, array $content, $no_validation) { //error_log(__METHOD__."(".array2string($etemplate_exec_id).', '.array2string($content).")"); @@ -271,7 +276,11 @@ class etemplate_new extends etemplate_widget_template ); $template->run('validate', array('', $expand, $content, &$validated), true); // $respect_disabled=true: do NOT validate disabled widgets and children - if (self::validation_errors(self::$request->ignore_validation)) + if ($no_validation) + { + self::$validation_errors = array(); + } + elseif (self::validation_errors(self::$request->ignore_validation)) { error_log(__METHOD__."(,".array2string($content).') validation_errors='.array2string(self::$validation_errors)); self::$response->generic('et2_validation_error', self::$validation_errors); diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index 108056e834..2672c0396d 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -551,7 +551,7 @@ etemplate2.prototype.submit = function(button, async, no_validation) this.unbind_unload(); var api = this.widgetContainer.egw(); - var request = api.json(this.menuaction, [this.etemplate_exec_id,values], null, this, async); + var request = api.json(this.menuaction, [this.etemplate_exec_id, values, no_validation], null, this, async); request.sendRequest(); } else