Merge pull request #27506 from nextcloud/bugfix/noid/fix-avatar-actions

Fix avatar actions
This commit is contained in:
Vincent Petry 2021-06-15 13:49:47 +02:00 committed by GitHub
commit cc4e6630db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -313,7 +313,10 @@ window.addEventListener('DOMContentLoaded', function () {
}
});
$('#selectavatar').click(function () {
$('#selectavatar').click(function (event) {
event.stopPropagation();
event.preventDefault();
OC.dialogs.filepicker(
t('settings', "Select a profile picture"),
function (path) {
@ -345,7 +348,10 @@ window.addEventListener('DOMContentLoaded', function () {
);
});
$('#removeavatar').click(function () {
$('#removeavatar').click(function (event) {
event.stopPropagation();
event.preventDefault();
$.ajax({
type: 'DELETE',
url: OC.generateUrl('/avatar/'),