This commit is contained in:
Zuzanna 2026-09-11 16:52:56 +02:00 committed by GitHub
commit 7b9b81e9d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -157,6 +157,8 @@ define(req, function(AppConfig, Default, Language) {
}
};
Messages.admin_logoType_error = 'The logo image file type is not allowed'; // XXX
return Messages;
});

View File

@ -1064,9 +1064,13 @@ define([
Util.onClickEnter($button, function () {
let files = input.files;
let fileTypes = ['image/png', 'image/svg+xml', 'image/jpeg'];
if (files.length !== 1) {
UI.warn(Messages.error);
return;
} else if (!fileTypes.includes(files[0].type)) {
UI.warn(Messages.admin_logoType_error);
return;
}
spinner.spin();
$button.attr('disabled', 'disabled');