Skip to content

Commit

Permalink
Fix HTML on update error page
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
  • Loading branch information
jancborchardt committed Aug 3, 2018
1 parent 49cbd8c commit 6d7bf81
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions core/js/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,15 @@
.removeClass('icon-loading-dark');

self.setErrorMessage(message);
var span = $('<span>')
.addClass('bold');
var updateUnsuccessful = $('<p>');
if(message === 'Exception: Updates between multiple major versions and downgrades are unsupported.') {
span.append(t('core', 'The update was unsuccessful. For more information <a href="{url}">check our forum post</a> covering this issue.', {'url': 'https://help.nextcloud.com/t/updates-between-multiple-major-versions-are-unsupported/7094'}));
updateUnsuccessful.append(t('core', 'The update was unsuccessful. For more information <a href="{url}">check our forum post</a> covering this issue.', {'url': 'https://help.nextcloud.com/t/updates-between-multiple-major-versions-are-unsupported/7094'}));
} else {
span.append(t('core', 'The update was unsuccessful. ' +
updateUnsuccessful.append(t('core', 'The update was unsuccessful. ' +
'Please report this issue to the ' +
'<a href="https://github.com/nextcloud/server/issues" target="_blank">Nextcloud community</a>.'));
}
span.appendTo($el);
updateUnsuccessful.appendTo($el);
});
updateEventSource.listen('done', function() {
$(window).off('beforeunload.inprogress');
Expand Down Expand Up @@ -123,9 +122,7 @@
setMessage: function(message) {
$('#update-progress-message').html(message);
$('#update-progress-detailed')
.append($('<span>'))
.append(message)
.append($('<br>'));
.append('<p>' + message + '</p>');
},

setPermanentMessage: function(message) {
Expand All @@ -134,19 +131,15 @@
.show()
.append($('<ul>').append(message));
$('#update-progress-detailed')
.append($('<span>'))
.append(message)
.append($('<br>'));
.append('<p>' + message + '</p>');
},

setErrorMessage: function (message) {
$('#update-progress-message-error')
.show()
.html(message);
$('#update-progress-detailed')
.append($('<span>'))
.append(message)
.append($('<br>'));
.append('<p>' + message + '</p>');
}
};

Expand Down

0 comments on commit 6d7bf81

Please sign in to comment.