/
index.html
51 lines (50 loc) · 1.44 KB
/
index.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
{% extends "skeleton.html" %}
{% block "title" %}Empires{% end %}
{% block "head" %}
<script type="text/javascript" src="/admin/js/tmpl.js"></script>
<script type="text/javascript" src="/admin/js/time.js"></script>
<script>
</script>
{% end %}
{% block "content" %}
<h1>Accounts</h1>
<table>
<tr>
<td>#</td>
<td>Empire name</td>
<td>Email address</td>
<td>Verified?</td>
<td></td>
</tr>
{% for account in accounts %}
<tr>
<td>{{ account.empire_id }}</td>
<td>{% include "inc/empire_name.html" empire = empires[account.empire_id] %}</a></td>
<td><span title="Canonical: {{ account.email_canonical }}">{{ account.email }}</span></td>
<td><span title="{{ account.email_verification_code }}">{{ account.email_status }}</span></td>
<td>{% if account.email_status != null && account.email_status.toString() == "UNVERIFIED" %}
<a href="javascript:resendEmail( '{{ account.empire_id }}' );">Resend email</a>
{% end %}</td>
</tr>
{% end %}
</table>
<script>
function resendEmail(empireId) {
$.ajax({
url: "/admin/ajax/accounts",
data: {
"action": "resend",
"id": empireId
},
method: "POST",
success: function(data) {
if (data != "success") {
alert(data);
} else {
alert("Verification email sent.");
}
}
});
}
</script>
{% end %}