Custom fields: better error reporting when an exception occurs while finalizing the form

SVN:trunk[3956]
This commit is contained in:
Romain Quetiez
2016-03-18 10:35:09 +00:00
parent af87ef3623
commit 81317d4df9
3 changed files with 31 additions and 13 deletions

View File

@@ -69,13 +69,23 @@ $(function()
json_obj: this.options.oWizardHelper.UpdateWizardToJSON()
},
function(data){
me._onUpdateSuccess(data, sFormPath);
if ('form' in data) {
me._onUpdateSuccess(data, sFormPath);
}
}
)
.fail(function(data){ me._onUpdateFailure(data, sFormPath); })
.always(function(data){
me.alignColumns();
$(me.element.find('[data-form-path="' + sFormPath + '"]')).unblock();
var oContainer = $(me.element.find('[data-form-path="' + sFormPath + '"]'));
oContainer.unblock();
if ('error' in data) {
oContainer.block({message: data.error});
console.log('Update field failure: '+data.error);
$('.blockOverlay').click(function(){
oContainer.unblock();
});
}
me._onUpdateAlways(data, sFormPath);
});
},