summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routers/web/admin/users.go2
-rw-r--r--routers/web/org/setting.go2
-rw-r--r--routers/web/repo/setting/avatar.go2
-rw-r--r--routers/web/user/setting/profile.go2
-rw-r--r--templates/admin/user/edit.tmpl2
-rw-r--r--templates/org/settings/options.tmpl2
-rw-r--r--templates/repo/settings/options.tmpl2
-rw-r--r--templates/user/settings/profile.tmpl2
8 files changed, 8 insertions, 8 deletions
diff --git a/routers/web/admin/users.go b/routers/web/admin/users.go
index 03c89bdab1..e560a88b4c 100644
--- a/routers/web/admin/users.go
+++ b/routers/web/admin/users.go
@@ -480,5 +480,5 @@ func DeleteAvatar(ctx *context.Context) {
ctx.Flash.Error(err.Error())
}
- ctx.Redirect(setting.AppSubURL + "/admin/users/" + strconv.FormatInt(u.ID, 10))
+ ctx.JSONRedirect(setting.AppSubURL + "/admin/users/" + strconv.FormatInt(u.ID, 10))
}
diff --git a/routers/web/org/setting.go b/routers/web/org/setting.go
index 5ae61c79be..957daab646 100644
--- a/routers/web/org/setting.go
+++ b/routers/web/org/setting.go
@@ -156,7 +156,7 @@ func SettingsDeleteAvatar(ctx *context.Context) {
ctx.Flash.Error(err.Error())
}
- ctx.Redirect(ctx.Org.OrgLink + "/settings")
+ ctx.JSONRedirect(ctx.Org.OrgLink + "/settings")
}
// SettingsDelete response for deleting an organization
diff --git a/routers/web/repo/setting/avatar.go b/routers/web/repo/setting/avatar.go
index ec673ca288..ae80f1db01 100644
--- a/routers/web/repo/setting/avatar.go
+++ b/routers/web/repo/setting/avatar.go
@@ -72,5 +72,5 @@ func SettingsDeleteAvatar(ctx *context.Context) {
if err := repo_service.DeleteAvatar(ctx, ctx.Repo.Repository); err != nil {
ctx.Flash.Error(fmt.Sprintf("DeleteAvatar: %v", err))
}
- ctx.Redirect(ctx.Repo.RepoLink + "/settings")
+ ctx.JSONRedirect(ctx.Repo.RepoLink + "/settings")
}
diff --git a/routers/web/user/setting/profile.go b/routers/web/user/setting/profile.go
index ab7d2e58b3..61089d0947 100644
--- a/routers/web/user/setting/profile.go
+++ b/routers/web/user/setting/profile.go
@@ -194,7 +194,7 @@ func DeleteAvatar(ctx *context.Context) {
ctx.Flash.Error(err.Error())
}
- ctx.Redirect(setting.AppSubURL + "/user/settings")
+ ctx.JSONRedirect(setting.AppSubURL + "/user/settings")
}
// Organization render all the organization of the user
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl
index 4fea418e6f..e99a4532d3 100644
--- a/templates/admin/user/edit.tmpl
+++ b/templates/admin/user/edit.tmpl
@@ -186,7 +186,7 @@
<div class="field">
<button class="ui green button">{{$.locale.Tr "settings.update_avatar"}}</button>
- <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete" data-redirect="{{.Link}}">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
+ <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
</div>
</form>
</div>
diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl
index 683b886467..03827e4c3f 100644
--- a/templates/org/settings/options.tmpl
+++ b/templates/org/settings/options.tmpl
@@ -94,7 +94,7 @@
<div class="field">
<button class="ui green button">{{$.locale.Tr "settings.update_avatar"}}</button>
- <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete" data-redirect="{{.Link}}">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
+ <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
</div>
</form>
</div>
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index cc7f431535..c157f637cf 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -58,7 +58,7 @@
</div>
<div class="field">
<button class="ui green button">{{$.locale.Tr "settings.update_avatar"}}</button>
- <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete" data-redirect="{{.Link}}">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
+ <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
</div>
</form>
</div>
diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl
index 96193a42ef..6db58fe4db 100644
--- a/templates/user/settings/profile.tmpl
+++ b/templates/user/settings/profile.tmpl
@@ -126,7 +126,7 @@
<div class="field">
<button class="ui green button">{{$.locale.Tr "settings.update_avatar"}}</button>
- <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete" data-redirect="{{.Link}}">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
+ <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
</div>
</form>
</div>