diff --git a/public/css/gogs.css b/public/css/gogs.css index 4a4144bab..05e308105 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -32,7 +32,7 @@ body { background-color: transparent; } -.btn{ +.btn { cursor: pointer; } @@ -234,7 +234,7 @@ body { /* gogits user setting */ -#gogs-user-setting-nav > h4, #gogs-user-setting-container > h4 ,#gogs-ssh-keys > h4{ +#gogs-user-setting-nav > h4, #gogs-user-setting-container > h4, #gogs-ssh-keys > h4, #gogs-user-delete > h4 { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #CCC; @@ -263,11 +263,11 @@ body { border-bottom: 1px solid #DDD; } -#gogs-ssh-keys .list-group-item:after{ +#gogs-ssh-keys .list-group-item:after { clear: both; } -#gogs-ssh-keys .list-group-item:hover a.delete{ +#gogs-ssh-keys .list-group-item:hover a.delete { display: block; } @@ -298,6 +298,6 @@ body { border-radius: 3px; } -#gogs-ssh-form textarea{ +#gogs-ssh-form textarea { height: 16em; } \ No newline at end of file diff --git a/public/js/app.js b/public/js/app.js index f6e147120..a789122b1 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -104,7 +104,7 @@ function initUserSetting(){ var $this = $(this); Gogits.ajaxDelete("",{"id":$this.data("del")},function(json){ if(json.ok){ - $this.parent().remove(); + window.location.reload(); }else{ alert(json.err); } diff --git a/routers/user/setting.go b/routers/user/setting.go index 96a02b6f4..0669784be 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -56,6 +56,7 @@ func SettingSSHKeys(form auth.AddSSHKeyForm, r render.Render, data base.TmplData "ok": true, }) } + return } // Add new SSH key. diff --git a/routers/user/user.go b/routers/user/user.go index 51a84400a..ca9dddaec 100644 --- a/routers/user/user.go +++ b/routers/user/user.go @@ -134,7 +134,7 @@ func SignUp(form auth.RegisterForm, data base.TmplData, req *http.Request, r ren // TODO: unfinished func Delete(data base.TmplData, req *http.Request, r render.Render) { - data["Title"] = "Delete user" + data["Title"] = "Delete Account" if req.Method == "GET" { r.HTML(200, "user/delete", data) diff --git a/templates/user/delete.tmpl b/templates/user/delete.tmpl index 939048b42..7a9dcddfe 100644 --- a/templates/user/delete.tmpl +++ b/templates/user/delete.tmpl @@ -1,12 +1,33 @@ {{template "base/head" .}} {{template "base/navbar" .}} +
+
+

Account Setting

+ +
+
+
+

Delete Account

+

Deleting your account is permanent. Sorry to see you go, if you have any feedback you can contact us.

+
+
+ +
+
+
+
+
+{{template "base/footer" .}} +{{template "base/head" .}} +{{template "base/navbar" .}}
-
-
-
- -
-
-
+
{{template "base/footer" .}} \ No newline at end of file diff --git a/templates/user/publickey.tmpl b/templates/user/publickey.tmpl index 7510616d8..0bd76593e 100644 --- a/templates/user/publickey.tmpl +++ b/templates/user/publickey.tmpl @@ -9,7 +9,7 @@
  • Notifications
  • SSH Keys
  • Security
  • -
  • Kill Myself
  • +
  • Delete Account
  • diff --git a/templates/user/setting.tmpl b/templates/user/setting.tmpl index cc527a25a..928d359a2 100644 --- a/templates/user/setting.tmpl +++ b/templates/user/setting.tmpl @@ -9,7 +9,7 @@
  • Notifications
  • SSH Keys
  • Security
  • -
  • Kill Myself
  • +
  • Delete Account