1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/15769] Fix JS and avatar functional tests

PHPBB3-15769
This commit is contained in:
Marc Alexander
2021-08-22 23:01:14 +02:00
parent b3308245c3
commit 27c5f61e30
2 changed files with 10 additions and 9 deletions

View File

@@ -46,7 +46,7 @@
// Ensure we have an img for the cropping
if (this.$box.children('img').length === 0) {
const $avatarImg = $('<img/>');
const $avatarImg = $('<img src="" alt="">');
$avatarImg.addClass('avatar');
this.image = $avatarImg;
this.$box.prepend($avatarImg);
@@ -181,15 +181,16 @@
}
// Handle errors while deleting file
if (typeof response.error !== 'undefined') {
phpbb.alert(response.error.title, response.error.messages.join('<br>'));
} else {
alert = phpbb.alert(response.MESSAGE_TITLE, response.MESSAGE_TEXT);
if (typeof response.error === 'undefined') {
const alert = phpbb.alert(response.MESSAGE_TITLE, response.MESSAGE_TEXT);
setTimeout(function() {
setTimeout(() => {
window.location = response.REFRESH_DATA.url.replace('&amp;', '&');
alert.hide();
}, response.REFRESH_DATA.time * 1000);
phpbb.avatars.destroy();
} else {
phpbb.alert(response.error.title, response.error.messages.join('<br>'));
}
},