Browse Source

fixed some broken forms that were introduced in james-anderson@521c5f0e10

tags/v1.2.0-rc1
James Anderson 11 years ago
parent
commit
e5af34a078
4 changed files with 6 additions and 6 deletions
  1. +3
    -3
      routers/user/setting.go
  2. +1
    -1
      templates/user/password.tmpl
  3. +1
    -1
      templates/user/publickey.tmpl
  4. +1
    -1
      templates/user/setting.tmpl

+ 3
- 3
routers/user/setting.go View File

@@ -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) log.Trace("%s User setting updated: %s", ctx.Req.RequestURI, ctx.User.LowerName)


ctx.Flash.Success("Your profile has been successfully updated.") ctx.Flash.Success("Your profile has been successfully updated.")
ctx.Redirect("/user/setting")
ctx.Redirect("/user/settings")
} }


func SettingSocial(ctx *middleware.Context) { 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.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) { func SettingSSHKeys(ctx *middleware.Context, form auth.AddSSHKeyForm) {
@@ -181,7 +181,7 @@ func SettingSSHKeys(ctx *middleware.Context, form auth.AddSSHKeyForm) {
} else { } else {
log.Trace("%s User SSH key added: %s", ctx.Req.RequestURI, ctx.User.LowerName) log.Trace("%s User SSH key added: %s", ctx.Req.RequestURI, ctx.User.LowerName)
ctx.Flash.Success("New SSH Key has been added!") ctx.Flash.Success("New SSH Key has been added!")
ctx.Redirect("/user/setting/ssh")
ctx.Redirect("/user/settings/ssh")
return return
} }
} }


+ 1
- 1
templates/user/password.tmpl View File

@@ -5,7 +5,7 @@
<div id="user-setting-container" class="col-md-9"> <div id="user-setting-container" class="col-md-9">
<div id="setting-pwd"> <div id="setting-pwd">
<h4>Password</h4> <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}} {{.CsrfTokenHtml}}
{{template "base/alert" .}} {{template "base/alert" .}}
<div class="form-group"> <div class="form-group">


+ 1
- 1
templates/user/publickey.tmpl View File

@@ -21,7 +21,7 @@
</ul> </ul>
<div class="modal fade" id="ssh-add-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal fade" id="ssh-add-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog"> <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}} {{.CsrfTokenHtml}}
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>


+ 1
- 1
templates/user/setting.tmpl View File

@@ -5,7 +5,7 @@
<div id="user-setting-container" class="col-md-9"> <div id="user-setting-container" class="col-md-9">
<div id="setting-pwd"> <div id="setting-pwd">
<h4>Account Profile</h4> <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}} {{.CsrfTokenHtml}}
{{template "base/alert" .}} {{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> <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>


Loading…
Cancel
Save