--- a/web/data/cubicweb.edition.js Tue Apr 20 09:58:28 2010 +0200
+++ b/web/data/cubicweb.edition.js Tue Apr 20 10:00:36 2010 +0200
@@ -321,9 +321,15 @@
}
function _clearPreviousErrors(formid) {
- jQuery('#' + formid + 'ErrorMessage').remove();
- jQuery('#' + formid + ' span.errorMsg').remove();
- jQuery('#' + formid + ' .error').removeClass('error');
+ // on some case (eg max request size exceeded, we don't know the formid
+ if (formid) {
+ jQuery('#' + formid + 'ErrorMessage').remove();
+ jQuery('#' + formid + ' span.errorMsg').remove();
+ jQuery('#' + formid + ' .error').removeClass('error');
+ } else {
+ jQuery('span.errorMsg').remove();
+ jQuery('.error').removeClass('error');
+ }
}
function _displayValidationerrors(formid, eid, errors) {
@@ -405,7 +411,12 @@
/* unfreeze form buttons when the validation process is over*/
function unfreezeFormButtons(formid) {
jQuery('#progress').hide();
- jQuery('#' + formid + ' .validateButton').removeAttr('disabled');
+ // on some case (eg max request size exceeded, we don't know the formid
+ if (formid) {
+ jQuery('#' + formid + ' .validateButton').removeAttr('disabled');
+ } else {
+ jQuery('.validateButton').removeAttr('disabled');
+ }
return true;
}