aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author无闻 <joe2010xtmf@163.com>2014-04-24 14:11:59 -0600
committer无闻 <joe2010xtmf@163.com>2014-04-24 14:11:59 -0600
commitcf7901fe6ad51e037c5237abdfc5f916c1b84885 (patch)
tree6c960eeb9aea55786b1465c886bb6c62e16a7365
parent521c5f0e10358c1c15e440678780139a1f97a84d (diff)
parente5af34a0787f2b5fd8a4da8571659af545da54a4 (diff)
Merge pull request #120 from james-anderson/master
fixed some broken forms in user settings
-rw-r--r--routers/user/setting.go6
-rw-r--r--templates/user/password.tmpl2
-rw-r--r--templates/user/publickey.tmpl2
-rw-r--r--templates/user/setting.tmpl2
4 files changed, 6 insertions, 6 deletions
diff --git a/routers/user/setting.go b/routers/user/setting.go
index a8fdc116..019044c5 100644
--- a/routers/user/setting.go
+++ b/routers/user/setting.go
@@ -66,7 +66,7 @@ func SettingPost(ctx *middleware.Context, form auth.UpdateProfileForm) {
log.Trace("%s User setting updated: %s", ctx.Req.RequestURI, ctx.User.LowerName)
ctx.Flash.Success("Your profile has been successfully updated.")
- ctx.Redirect("/user/setting")
+ ctx.Redirect("/user/settings")
}
func SettingSocial(ctx *middleware.Context) {
@@ -122,7 +122,7 @@ func SettingPasswordPost(ctx *middleware.Context, form auth.UpdatePasswdForm) {
ctx.Flash.Success("Password is changed successfully. You can now sign in via new password.")
}
- ctx.Redirect("/user/setting/password")
+ ctx.Redirect("/user/settings/password")
}
func SettingSSHKeys(ctx *middleware.Context, form auth.AddSSHKeyForm) {
@@ -181,7 +181,7 @@ func SettingSSHKeys(ctx *middleware.Context, form auth.AddSSHKeyForm) {
} else {
log.Trace("%s User SSH key added: %s", ctx.Req.RequestURI, ctx.User.LowerName)
ctx.Flash.Success("New SSH Key has been added!")
- ctx.Redirect("/user/setting/ssh")
+ ctx.Redirect("/user/settings/ssh")
return
}
}
diff --git a/templates/user/password.tmpl b/templates/user/password.tmpl
index cba9cce0..c55d27fa 100644
--- a/templates/user/password.tmpl
+++ b/templates/user/password.tmpl
@@ -5,7 +5,7 @@
<div id="user-setting-container" class="col-md-9">
<div id="setting-pwd">
<h4>Password</h4>
- <form class="form-horizontal" id="password-form" method="post" action="/user/setting/password">
+ <form class="form-horizontal" id="password-form" method="post" action="/user/settings/password">
{{.CsrfTokenHtml}}
{{template "base/alert" .}}
<div class="form-group">
diff --git a/templates/user/publickey.tmpl b/templates/user/publickey.tmpl
index 8eb7be48..bf9aac11 100644
--- a/templates/user/publickey.tmpl
+++ b/templates/user/publickey.tmpl
@@ -21,7 +21,7 @@
</ul>
<div class="modal fade" id="ssh-add-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
- <form class="modal-content form-horizontal" id="ssh-form" method="post" action="/user/setting/ssh/">
+ <form class="modal-content form-horizontal" id="ssh-form" method="post" action="/user/settings/ssh/">
{{.CsrfTokenHtml}}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
diff --git a/templates/user/setting.tmpl b/templates/user/setting.tmpl
index a81f8bf6..56d859fe 100644
--- a/templates/user/setting.tmpl
+++ b/templates/user/setting.tmpl
@@ -5,7 +5,7 @@
<div id="user-setting-container" class="col-md-9">
<div id="setting-pwd">
<h4>Account Profile</h4>
- <form class="form-horizontal" id="password-form" method="post" action="/user/setting">
+ <form class="form-horizontal" id="password-form" method="post" action="/user/settings">
{{.CsrfTokenHtml}}
{{template "base/alert" .}}
<p>Your Email address is public and will be used for any account related notifications, and any web based operations made via the site.</p>