web/data/cubicweb.edition.js
branchstable
changeset 5665 1b5d9ec38c1b
parent 5475 b44bad36e609
child 5679 0f2ded880d01
--- a/web/data/cubicweb.edition.js	Thu Jun 03 16:47:57 2010 +0200
+++ b/web/data/cubicweb.edition.js	Thu Jun 03 18:45:02 2010 +0200
@@ -395,13 +395,15 @@
     // Failures
     _clearPreviousErrors(formid);
     var descr = result[1];
+    var errmsg;
     // Unknown structure
     if ( !isArrayLike(descr) || descr.length != 2 ) {
-	updateMessage(descr);
-	return false;
+	errmsg = descr;
+    } else {
+	_displayValidationerrors(formid, descr[0], descr[1]);
+	errmsg = _('please correct errors below');
     }
-    _displayValidationerrors(formid, descr[0], descr[1]);
-    updateMessage(_('please correct errors below'));
+    updateMessage(errmsg);
     // ensure the browser does not scroll down
     document.location.hash = '#header';
     return false;