forked from picoCTF/picoCTF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.html
130 lines (127 loc) · 5.21 KB
/
profile.html
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
layout: default
title: Profile
post_scripts:
- js/profile.js
- js/libs/download.js
startup_functions:
- redirectIfNotLoggedIn()
---
<div class="container">
<div class="row">
<div class="col-md-6" >
<div id="group-info"></div>
<div id="team-management"></div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Update User Password</h3>
</div>
<div class="panel-body">
<div class="col-md-10 col-md-offset-1">
<form role="form" id="password-update-form">
<div class="form-group">
<label for="current-password" class="control-label">Current Password</label>
<input name="current-password" id="current-password" class="form-control" type="password" placeholder="Current Password">
</div>
<div class="form-group">
<label for="new-password" class="control-label">New Password</label>
<input name="new-password" id="new-password" class="form-control" type="password" placeholder="New Password">
</div>
<div class="form-group">
<label for="new-password-confirmation" class="control-label">Repeat New Password</label>
<input name="new-password-confirmation" id="new-password-confirmation" class="form-control" type="password" placeholder="Repeat New Password">
</div>
<div class="form-group">
<button id="password-update-button" class="btn btn-primary" type="submit">Update Password</button>
</div>
</form>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Download Account Data</h3>
</div>
<div class="panel-body">
<div class="col-md-10 col-md-offset-1">
<form role="form" id="download-data-form">
<p>Click here to download all data associated with your account.</p>
<div class="form-group">
<button id="download-data-button" class="btn btn-primary" type="submit">Download Account Data</button>
</div>
</form>
</div>
</div>
</div>
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title">Delete Account</h3>
<em>This is a permanent action; you can not undo this.</em>
</div>
<div class="panel-body">
<div class="col-md-10 col-md-offset-1">
<form role="form" id="disable-account-form">
<p>Deleting your account will remove you from the competition. You will not be able to log in once you delete your account. Deleted accounts cannot be re-enabled.</p>
<div class="form-group">
<label for="current-password" class="control-label">Current Password</label>
<input name="current-password" id="current-password-disable" class="form-control" type="password" placeholder="Current Password">
</div>
<div class="form-group">
<button id="disable-account-button" class="btn btn-danger" type="submit">Delete Account</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/template" id="group-info-template">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Classroom Membership</h3>
</div>
<% if(data.length > 0) { %>
<table class="table">
<thead>
<tr>
<th class="deleter-column"></th>
<th>Classroom Name</th>
</tr>
</thead>
<tbody>
<% _.each(data, function(group) { %>
<tr>
<td>
<% if (!window.isTeacher){ %>
<span data-group-name="<%- group.name %>" data-group-owner="<%- group.owner %>" data-gid="<%- group.gid %>" class="glyphicon glyphicon-remove leave-group-span"></span>
<% } %>
</td>
<td>
<span><%- group.name %> (<%- group.owner %>)</span>
<% if (window.username == group.owner) { %>
<span class="pull-right"> You own this class. </span>
<% } %>
</td>
</tr>
<% }); %>
</tbody>
</table>
<% } %>
<div class="panel-body team-panel-body">
<form role="form" class="form-inline" id="group-request-form" type="submit">
<div class="form-group">
<label class="sr-only" for="group-name-input">Classroom Name</label>
<input type="text" class="form-control class-class-name" id="group-name-input" placeholder="Classroom Name">
</div>
<div class="form-group">
<label class="sr-only" for="group-owner-input">Classroom Owner Username</label>
<input type="text" class="form-control class-teacher-username" id="group-owner-input" placeholder="Classroom Owner Username">
</div>
<button class="btn btn-primary" id="join-group">Join</button>
</form>
</div>
</div>
</script>