diff --git a/public/css/gogs.css b/public/css/gogs.css index a44d4a938088..7a05b9abe494 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -269,7 +269,8 @@ body { /* gogits user setting */ -#gogs-user-setting-nav > h4, #gogs-user-setting-container > h4, #gogs-ssh-keys > h4, #gogs-user-delete > h4 ,#gogs-repo-setting-container .tab-pane > h4{ +#gogs-user-setting-nav > h4, #gogs-user-setting-container > h4, #gogs-user-setting-container > div > h4, +#gogs-ssh-keys > h4, #gogs-user-delete > h4, #gogs-repo-setting-container .tab-pane > h4 { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #CCC; @@ -429,8 +430,7 @@ body { margin-bottom: 4px; } - -#gogs-repo-toolbar{ +#gogs-repo-toolbar { margin-top: 51px; margin-bottom: -50px; border-bottom: 1px solid #BBB; @@ -438,23 +438,23 @@ body { height: 40px; } -#gogs-repo-toolbar .navbar-default{ +#gogs-repo-toolbar .navbar-default { border: none; height: 39px; } -#gogs-repo-toolbar .nav > li > a{ +#gogs-repo-toolbar .nav > li > a { height: 39px; } -#gogs-repo-toolbar .navbar-toolbar.navbar-default .navbar-nav>.active>a:after{ +#gogs-repo-toolbar .navbar-toolbar.navbar-default .navbar-nav > .active > a:after { border-bottom-color: #999; } -#gogs-repo-toolbar .navbar.nav-toolbar{ +#gogs-repo-toolbar .navbar.nav-toolbar { margin-bottom: 0; } -#gogs-repo-toolbar .navbar-collapse{ +#gogs-repo-toolbar .navbar-collapse { padding: 0; } \ No newline at end of file diff --git a/routers/user/setting.go b/routers/user/setting.go index 02a214b2c1bb..cf11095bead5 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -47,6 +47,14 @@ func Setting(form auth.UpdateProfileForm, r render.Render, data base.TmplData, r r.HTML(200, "user/setting", data) } +func SettingEmailPassword(r render.Render, data base.TmplData, session sessions.Session, req *http.Request) { + data["Title"] = "Email & Password" + data["PageIsUserSetting"] = true + data["IsPwdSuccess"] = (req.FormValue("password") == "true") + + r.HTML(200, "user/email_password", data) +} + func UpdatePasswd(form auth.UpdatePasswdForm, r render.Render, data base.TmplData, req *http.Request, session sessions.Session) { data["Title"] = "Setting" data["PageIsUserSetting"] = true diff --git a/templates/user/delete.tmpl b/templates/user/delete.tmpl index af0e1fbc0692..37259f61e576 100644 --- a/templates/user/delete.tmpl +++ b/templates/user/delete.tmpl @@ -5,10 +5,10 @@

Account Setting

diff --git a/templates/user/email_password.tmpl b/templates/user/email_password.tmpl new file mode 100644 index 000000000000..364bcf398e19 --- /dev/null +++ b/templates/user/email_password.tmpl @@ -0,0 +1,53 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +
+
+

Account Setting

+ +
+
+
+

Email

+

Your Primary Email will be used for Account related notifications as well as any web based operations, such as edits and merges made via the web.

+

// TODO


+
+
+

Password

+
{{if .IsPwdSuccess}} +

Password is changed successfully. You can sign in via new password.

{{end}} +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+    + Forget Password ? +
+
+
+
+
+
+{{template "base/footer" .}} \ No newline at end of file diff --git a/templates/user/publickey.tmpl b/templates/user/publickey.tmpl index 0bd76593e7fe..195af7588745 100644 --- a/templates/user/publickey.tmpl +++ b/templates/user/publickey.tmpl @@ -5,10 +5,10 @@

Account Setting

diff --git a/templates/user/publickey_add.tmpl b/templates/user/publickey_add.tmpl deleted file mode 100644 index 634b859ddd10..000000000000 --- a/templates/user/publickey_add.tmpl +++ /dev/null @@ -1,26 +0,0 @@ -{{template "base/head" .}} -{{template "base/navbar" .}} -
-
-
- -
- -
-
- -
- -
- -
-
- -
-
- -
-
-
-
-{{template "base/footer" .}} \ No newline at end of file diff --git a/templates/user/publickey_added.tmpl b/templates/user/publickey_added.tmpl deleted file mode 100644 index f67da9ed85b9..000000000000 --- a/templates/user/publickey_added.tmpl +++ /dev/null @@ -1,8 +0,0 @@ -{{template "base/head" .}} -{{template "base/navbar" .}} -
-
- publickey added -
-
-{{template "base/footer" .}} \ No newline at end of file diff --git a/templates/user/publickey_list.tmpl b/templates/user/publickey_list.tmpl deleted file mode 100644 index fbd640b4bf28..000000000000 --- a/templates/user/publickey_list.tmpl +++ /dev/null @@ -1,12 +0,0 @@ -{{template "base/head" .}} -{{template "base/navbar" .}} -
-
Add publick key
- -
-{{template "base/footer" .}} \ No newline at end of file diff --git a/templates/user/setting.tmpl b/templates/user/setting.tmpl index 79de58fe75ab..380ac88a62ba 100644 --- a/templates/user/setting.tmpl +++ b/templates/user/setting.tmpl @@ -5,10 +5,10 @@

Account Setting

diff --git a/web.go b/web.go index a80c4924b957..4712861763d4 100644 --- a/web.go +++ b/web.go @@ -64,6 +64,7 @@ func runWeb(*cli.Context) { m.Get("/user/feeds", binding.Bind(auth.FeedsForm{}), user.Feeds) m.Any("/user/setting", auth.SignInRequire(true), binding.BindIgnErr(auth.UpdateProfileForm{}), user.Setting) + m.Get("/user/setting/email_password",auth.SignInRequire(true),user.SettingEmailPassword) m.Post("/user/setting/update_passwd", auth.SignInRequire(true), binding.BindIgnErr(auth.UpdatePasswdForm{}), user.UpdatePasswd) m.Any("/user/setting/ssh", auth.SignInRequire(true), binding.BindIgnErr(auth.AddSSHKeyForm{}), user.SettingSSHKeys)