summaryrefslogtreecommitdiffstats
path: root/routers/user/setting/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/setting/account.go')
-rw-r--r--routers/user/setting/account.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/routers/user/setting/account.go b/routers/user/setting/account.go
index 42c2c59b7e..4900bba14a 100644
--- a/routers/user/setting/account.go
+++ b/routers/user/setting/account.go
@@ -10,13 +10,14 @@ import (
"time"
"code.gitea.io/gitea/models"
- "code.gitea.io/gitea/modules/auth"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
+ auth "code.gitea.io/gitea/modules/forms"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/password"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/timeutil"
+ "code.gitea.io/gitea/modules/web"
"code.gitea.io/gitea/services/mailer"
)
@@ -36,7 +37,8 @@ func Account(ctx *context.Context) {
}
// AccountPost response for change user's password
-func AccountPost(ctx *context.Context, form auth.ChangePasswordForm) {
+func AccountPost(ctx *context.Context) {
+ form := web.GetForm(ctx).(*auth.ChangePasswordForm)
ctx.Data["Title"] = ctx.Tr("settings")
ctx.Data["PageIsSettingsAccount"] = true
@@ -80,7 +82,8 @@ func AccountPost(ctx *context.Context, form auth.ChangePasswordForm) {
}
// EmailPost response for change user's email
-func EmailPost(ctx *context.Context, form auth.AddEmailForm) {
+func EmailPost(ctx *context.Context) {
+ form := web.GetForm(ctx).(*auth.AddEmailForm)
ctx.Data["Title"] = ctx.Tr("settings")
ctx.Data["PageIsSettingsAccount"] = true
@@ -252,8 +255,8 @@ func DeleteAccount(ctx *context.Context) {
}
// UpdateUIThemePost is used to update users' specific theme
-func UpdateUIThemePost(ctx *context.Context, form auth.UpdateThemeForm) {
-
+func UpdateUIThemePost(ctx *context.Context) {
+ form := web.GetForm(ctx).(*auth.UpdateThemeForm)
ctx.Data["Title"] = ctx.Tr("settings")
ctx.Data["PageIsSettingsAccount"] = true