Fix error message for file upload limit on steps [SCI-4645]

This commit is contained in:
Oleksii Kriuchykhin 2020-05-18 16:14:59 +02:00
parent e9a05d2e3d
commit bc1ee1bd8d

View file

@ -273,11 +273,9 @@
if (totalSize > fileMaxSize) {
filesValid = false;
disableSubmitButton();
$.each($('.panel-step-attachment-new'), function() {
if (!$(this).find('p').hasClass('dnd-total-error')) {
$(this)
.find('.panel-body')
.append("<p class='dnd-total-error'>" + I18n.t('general.file.total_size', { size: fileMaxSizeMb }) + '</p>');
$.each($('.attachment-placeholder.new'), function() {
if (!$(this).find('p').hasClass('dnd-error')) {
$(this).append("<p class='dnd-total-error'>" + I18n.t('general.file.total_size', { size: fileMaxSizeMb }) + '</p>');
}
});
} else {