diff options
author | slene <vslene@gmail.com> | 2014-03-16 21:07:50 +0800 |
---|---|---|
committer | slene <vslene@gmail.com> | 2014-03-16 21:07:50 +0800 |
commit | f6e32b1b08a5eff2c0cbdfe827b40fdea9dc676e (patch) | |
tree | 12abcc1c0c3c35de5e45d0c6332819d724c71de6 /templates | |
parent | 0754dd2f955c70994753cd18228333ca32ceee72 (diff) | |
download | gitea-f6e32b1b08a5eff2c0cbdfe827b40fdea9dc676e.tar.gz gitea-f6e32b1b08a5eff2c0cbdfe827b40fdea9dc676e.zip |
finish delete ssh key and delete account. all with confirm.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/delete.tmpl | 41 | ||||
-rw-r--r-- | templates/user/publickey.tmpl | 8 |
2 files changed, 31 insertions, 18 deletions
diff --git a/templates/user/delete.tmpl b/templates/user/delete.tmpl index 904201772e..a116787c80 100644 --- a/templates/user/delete.tmpl +++ b/templates/user/delete.tmpl @@ -13,22 +13,33 @@ </ul> </div> <div id="gogs-user-setting-container" class="col-md-9"> - <form action="/user/delete" method="post" class="form-horizontal" id="gogs-user-delete"> - <h4>Delete Account</h4> - <p class="alert alert-danger">{{if not .HasError}}The operation will delete your account permanently. Sorry to see you go, but we know you'll back soon.{{else}}{{.ErrorMsg}}{{end}}</p> - <div class="form-group"> - <div class="col-md-3"> - <button type="submit" class="btn btn-danger btn-lg">Delete Account</button> + <h4>Delete Account</h4> + <p class="alert alert-danger">{{if not .HasError}}The operation will delete your account permanently. Sorry to see you go, but we know you'll back soon.{{else}}{{.ErrorMsg}}{{end}}</p> + <div class="form-group"> + <button type="submit" class="btn btn-danger btn-lg" href="#delete-account-modal" id="gogs-delete-account" data-toggle="modal">Delete Account</button> + </div> + </div> + <div class="modal fade" id="delete-account-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-dialog"> + <form action="/user/delete" method="post" class="modal-content" id="gogs-user-delete"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + <h4 class="modal-title" id="myModalLabel">Delete Account</h4> + </div> + + <div class="modal-body"> + <div class="form-group"> + <label>Make sure your are owner of this account. Please enter your password.<strong class="text-danger">*</strong></label> + <input name="password" class="form-control" type="password" placeholder="Type your account password" required="required"> + </div> + </div> + + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> + <button type="submit" class="btn btn-danger">Delete</button> </div> - </div> - </form> + </form> + </div> </div> </div> -<script> - $(function(){ - $('#gogs-user-delete').on('submit',function(){ - return confirm("Are you sure ?"); - }) - }); -</script> {{template "base/footer" .}}
\ No newline at end of file diff --git a/templates/user/publickey.tmpl b/templates/user/publickey.tmpl index 3b2cc1128f..104575d488 100644 --- a/templates/user/publickey.tmpl +++ b/templates/user/publickey.tmpl @@ -18,12 +18,14 @@ <h4>SSH Keys</h4>{{if .AddSSHKeySuccess}} <p class="alert alert-success">New SSH Key has been added !</p>{{else if .HasError}}<p class="alert alert-danger">{{.ErrorMsg}}</p>{{end}} <ul id="gogs-ssh-keys-list" class="list-group"> - <li class="list-group-item"><span class="name">SSH Key's name</span></li>{{range .Keys}} + <li class="list-group-item"><span class="name">SSH Key's name</span></li> + {{range .Keys}} <li class="list-group-item"> <span class="name">{{.Name}}</span> <span class="print">({{.Fingerprint}})</span> - <a href="#" class="btn btn-link btn-danger right delete" rel="{{.Id}}" data-del="{{.Id}}">Delete</a> - </li>{{end}} + <button href="#" class="btn btn-danger delete pull-right" rel="{{.Id}}" data-del="{{.Id}}">Delete</button> + </li> + {{end}} <li class="list-group-item"> <a class="btn btn-link btn-primary" href="#ssh-add-modal" id="gogs-ssh-add" data-toggle="modal">Add SSH Key</a> </li> |