mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-22 14:54:38 +08:00
Merge pull request #718 from ZmagoD/zd_SCI_1129_v3
Fixes error message [fixes SCI-1129]
This commit is contained in:
commit
53a1dd14b7
1 changed files with 8 additions and 1 deletions
|
@ -76,7 +76,14 @@
|
||||||
Comments.initialize();
|
Comments.initialize();
|
||||||
initNewResultAsset();
|
initNewResultAsset();
|
||||||
}).on('ajax:error', function(e, xhr) {
|
}).on('ajax:error', function(e, xhr) {
|
||||||
$form.renderFormErrors('result', xhr.responseJSON, true, e);
|
var errors = xhr.responseJSON.errors;
|
||||||
|
var formInput = $form.find('#result_asset_attributes_file');
|
||||||
|
$('[data-status="error"]').remove();
|
||||||
|
$.each(errors, function(key, value) {
|
||||||
|
var message = '<span data-status="error" style="color: #a94442">';
|
||||||
|
message += value + '</span>';
|
||||||
|
formInput.after(message);
|
||||||
|
})
|
||||||
animateSpinner(null, false);
|
animateSpinner(null, false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue