mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-10 14:46:42 +08:00
Merge pull request #1945 from urbanrotnik/ur-sci-3708-missing-error-message-at-import
Fix showing errors [SCI-3708]
This commit is contained in:
commit
916ff06f99
1 changed files with 2 additions and 2 deletions
|
@ -154,8 +154,8 @@ function showFormErrors(modal, errors) {
|
|||
var msg;
|
||||
msg = key.charAt(0).toUpperCase() + key.slice(1) + ': ' + errors.protocol[key].join(', ');
|
||||
if ((input.length > 0) && (errors.protocol[key].length > 0)) {
|
||||
input.parent().next('span.help-block').html(msg);
|
||||
input.parent().parent().addClass('has-error');
|
||||
input.closest('.form-group').children('span.help-block').html(msg);
|
||||
input.closest('.form-group').addClass('has-error');
|
||||
} else if (errors.protocol[key].length > 0) {
|
||||
modal.find('.general-error > span').append(msg + '<br/>');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue