This repository was archived by the owner on Dec 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.html
More file actions
75 lines (66 loc) · 2.18 KB
/
config.html
File metadata and controls
75 lines (66 loc) · 2.18 KB
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
{% extends "admin/base.html" %}
{% block stylesheets %}
{% endblock %}
{% block content %}
<div class="jumbotron">
<div class="container">
<h1>Notifications</h1>
</div>
</div>
{% if not (get_config('thunderpush_url')
and get_config('thunderpush_port')
and get_config('thunderpush_client_secret')
and get_config('thunderpush_server_secret')) %}
<div class="container">
<div class="row">
<div class="col-md-6 offset-md-3">
<form method="POST" id="thunderpush_settings">
<p class="text-center">Thunderpush Configuration</p>
<div class="form-group">
<div class="form-group">
<label>Thunderpush URL</label>
<input class="form-control" name='thunderpush_url' type='text' placeholder="Thunderpush URL">
</div>
<div class="form-group">
<label>Thunderpush Port</label>
<input class="form-control" name='thunderpush_port' type='text' placeholder="Thunderpush Port">
</div>
<div class="form-group">
<label>Thunderpush Client Secret</label>
<input class="form-control" name='thunderpush_client_secret' type='text' placeholder="Thunderpush Client Secret">
</div>
<div class="form-group">
<label>Thunderpush Server Secret</label>
<input class="form-control" name='thunderpush_server_secret' type='text' placeholder="Thunderpush Server Secret">
</div>
</div>
<input id="nonce" name='nonce' type='hidden' value="{{ nonce }}">
<div class="float-right">
<button type="submit" class="btn btn-success text-center">Submit</button>
</div>
</form>
</div>
</div>
</div>
{% else %}
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<a class="btn btn-info" href="/admin/plugins/notify/send">Send Notification</a>
</div>
</div>
</div>
{% endif %}
{% endblock %}
{% block scripts %}
<script type="text/javascript">
$('#thunderpush_settings').submit(function(e){
e.preventDefault();
$.post(window.location.pathname, $(this).serialize(), function(data){
if (data == 1){
window.location.reload();
}
});
});
</script>
{% endblock %}