translate not found fields, also clear global errors stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 02 Jul 2009 12:58:17 +0200
branchstable
changeset 2242 6772f8e859c2
parent 2241 fcf08ac5f8c0
child 2243 1bcf57df9c11
translate not found fields, also clear global errors
web/data/cubicweb.edition.js
--- a/web/data/cubicweb.edition.js	Thu Jul 02 12:57:51 2009 +0200
+++ b/web/data/cubicweb.edition.js	Thu Jul 02 12:58:17 2009 +0200
@@ -306,6 +306,7 @@
 
 function _clearPreviousErrors(formid) {
     jQuery('#' + formid + ' span.error').remove();
+    jQuery('div.errorMessage').remove();
 }
 
 function _displayValidationerrors(formid, eid, errors) {
@@ -324,7 +325,7 @@
 	    field.before(span);
 	} else {
 	    firsterrfield = formid;
-	    globalerrors.push(fieldname + ': ' + errmsg);
+	    globalerrors.push(_(fieldname) + ' : ' + errmsg);
 	}
     }
     if (globalerrors.length) {