Merge pull request #1133 from ZmagoD/zd_SCI_2337

fixes error message for invalid file type [fixes SCI-2337]
This commit is contained in:
Zmago Devetak 2018-05-16 08:26:11 +02:00 committed by GitHub
commit b771149477
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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>');
} }
}); });
}); });