aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user/delete.tmpl
blob: 17c9ea89250fe3ac87a13091e11ea2b888564885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{{template "base/head" .}}
{{template "base/navbar" .}}
<div id="body" class="container" data-page="user">
    <div id="user-setting-nav" class="col-md-3">
        <h4>Account Setting</h4>
        <ul class="list-group">
            <li class="list-group-item"><a href="/user/setting">Account Profile</a></li>
            <li class="list-group-item"><a href="/user/setting/password">Password</a></li>
            <!-- <li class="list-group-item"><a href="/user/setting/notification">Notifications</a></li> -->
            <li class="list-group-item"><a href="/user/setting/ssh/">SSH Keys</a></li>
            <!-- <li class="list-group-item"><a href="/user/setting/security">Security</a></li> -->
            <li class="list-group-item list-group-item-success"><a href="/user/delete">Delete Account</a></li>
        </ul>
    </div>
    <div id="user-setting-container" class="col-md-9">
        <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="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="user-delete">
                {{.CsrfTokenHtml}}
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</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>
            </form>
        </div>
    </div>
</div>
{{template "base/footer" .}}