mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 21:21:50 +08:00
Merge pull request #1133 from ZmagoD/zd_SCI_2337
fixes error message for invalid file type [fixes SCI-2337]
This commit is contained in:
commit
b771149477
1 changed files with 2 additions and 1 deletions
|
@ -784,9 +784,10 @@ var RepositoryDatatable = (function(global) {
|
||||||
$.each(val, function(key, val) {
|
$.each(val, function(key, val) {
|
||||||
var input = $(selectedRecord).find('input[name=' + key + ']');
|
var input = $(selectedRecord).find('input[name=' + key + ']');
|
||||||
if (input) {
|
if (input) {
|
||||||
|
var message = Array.isArray(val.data) ? val.data[0] : val.data;
|
||||||
input.closest('.form-group').addClass('has-error');
|
input.closest('.form-group').addClass('has-error');
|
||||||
input.parent().append("<span class='help-block'>" +
|
input.parent().append("<span class='help-block'>" +
|
||||||
val.data[0] + '<br /></span>');
|
message + '<br /></span>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue