This repository has been archived by the owner on May 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
invite_blocker.html
61 lines (59 loc) · 2.58 KB
/
invite_blocker.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
{% extends 'configure_server.html' %}
{% block rightSidebarContents %}
<div class="category-name">
{{ DASHBOARD_INVITE_BLOCKER }}
</div>
{{ generateCheckbox(1, "isEnabled", DASHBOARD_ACTIVATE_MODULE, "", serverConfig.inviteBlockerConfig.isEnabled, true) }}
<hr>
<div id="hiddenIfDisabled">
{{ generateCheckbox(2, "whitelistServerInvites", DASHBOARD_ALLOW_SERVER_INVITES, "", serverConfig.inviteBlockerConfig.whitelistServerInvites, true) }}
<hr>
{{ generateCheckbox(3, "deleteMessage", DASHBOARD_DELETE_MESSAGE_ON_INVITE, "", serverConfig.inviteBlockerConfig.deleteMessage, true) }}
<hr>
{{ generateCheckbox(4, "tellUser", DASHBOARD_WARN_ON_INVITE, "", serverConfig.inviteBlockerConfig.tellUser, true) }}
<hr>
<div class="flavourText">{{ DASHBOARD_MESSAGE_ON_INVITE_DETECT }}</div>
<textarea data-send-on-save="true" data-internal-name="warnMessage">{{ serverConfig.inviteBlockerConfig.warnMessage }}</textarea>
<hr>
<div class="flavourText">{{ DASHBOARD_WHITELISTED_CHANNELS_INVITE }}</div>
<select name="chooseRole" id="chooseRole">
{% for channel in guild.getTextChannels() %}
<option value="{{ channel.getId }}">#{{ channel.getName }}</option>
{% endfor %}
</select>
<button type="button" onclick="addLink()" class="button-success pure-button">Adicionar</button>
<div class="toggleSubText">Clique em um canal de texto na lista abaixo para remover ele!</div>
<table id="musicTable">
{% if serverConfig.inviteBlockerConfig.whitelistedChannels|length > 0 %}
{% for channel in serverConfig.inviteBlockerConfig.whitelistedChannels %}
{% set jdaChannel = guild.getTextChannelById(channel) %}
{% if jdaChannel != null %}
<tr>
<td data-internalid="{{ channel }}" onclick="DL1(this)"><div style="margin-bottom: 2px; display: inline-block; padding: 2px 0px 2px 0px;" class="discord-mention">#{{ jdaChannel.getName() }}</div></td>
</tr>
{% endif %}
{% endfor %}
{% endif %}
</table>
<input type="hidden" id="blacklistedChannels" data-send-on-save="true" data-convert-to-list="true" data-internal-name="whitelistedChannels" value="{{ whitelistedChannels }}">
</div>
<hr>
<button onclick="prepareSave()" style="float: right;" class="button-discord button-discord-success pure-button">{{ DASHBOARD_SAVE }}</button>
<br style="clear: both" /> <!-- So dirty! -->
<script>
$("#cmn-toggle-1").click(function(e) {
applyBlur()
});
function applyBlur() {
var e = $("#hiddenIfDisabled");
if ($('#cmn-toggle-1').is(':checked')) {
e.removeClass();
e.addClass("noBlur");
} else {
e.removeClass();
e.addClass("blurSection");
}
}
applyBlur();
</script>
{% endblock %}