-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathsetup.html
253 lines (236 loc) · 8.13 KB
/
setup.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
{% extends "base.html" %}
{% block stylesheets %}
{% endblock %}
{% block content %}
<div class="jumbotron">
<div class="container">
<h1>Setup</h1>
</div>
</div>
<div class="container">
<div class="col-md-8 offset-md-2">
{% include "components/errors.html" %}
{% with form = Forms.setup.SetupForm() %}
<form method="post" accept-charset="utf-8" autocomplete="off" role="form" class="form-horizontal" id="setup-form" enctype="multipart/form-data">
<ul class="nav nav-pills nav-fill mb-4">
<li class="nav-item">
<a class="nav-link active" data-toggle="pill" href="#general">General</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#administration">Administration</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#style">Style</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#datetime">Date & Time</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#integrations">Integrations</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade show active" id="general" role="tabpanel">
<div class="form-group">
<b>{{ form.ctf_name.label }}</b>
{{ form.ctf_name(class="form-control") }}
<small class="form-text text-muted">
{{ form.ctf_name.description }}
</small>
</div>
<div class="form-group">
<b>{{ form.ctf_description.label }}</b>
{{ form.ctf_description(class="form-control", rows="5") }}
<small class="form-text text-muted">
{{ form.ctf_description.description }}
</small>
</div>
<div class="form-group">
<b>{{ form.user_mode.label }}</b>
{% for radio in form.user_mode %}
<div class="form-check ml-3">
{{ radio(class="form-check-input") }}
{{ radio.label }}
</div>
{% endfor %}
<small class="form-text text-muted">
{{ form.user_mode.description }}
</small>
</div>
<div class="text-right">
<button type="button" class="btn btn-primary btn-outlined tab-next" data-href="#administration">
Next
</button>
</div>
</div>
<div class="tab-pane fade" id="administration" role="tabpanel">
<div class="form-group">
<b>{{ form.name.label }}</b>
{{ form.name(class="form-control") }}
<small class="form-text text-muted">
{{ form.name.description }}
</small>
</div>
<div class="form-group">
<b>{{ form.email.label }}</b>
{{ form.email(class="form-control") }}
<small class="form-text text-muted">
{{ form.email.description }}
</small>
</div>
<div class="form-group">
<b>{{ form.password.label }}</b>
{{ form.password(class="form-control") }}
<small class="form-text text-muted">
{{ form.password.description }}
</small>
</div>
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" value="" id="newsletter-checkbox" checked>
Subscribe email address to the CTFd LLC Newsletter for news and updates
</label>
</div>
<div class="text-right">
<button type="button" class="btn btn-primary btn-outlined tab-next" data-href="#style">
Next
</button>
</div>
</div>
<div class="tab-pane fade" id="style" role="tabpanel">
<div class="form-group">
<b>{{ form.ctf_logo.label }}</b>
{{ form.ctf_logo(class="form-control-file", accept="image/*") }}
<small class="form-text text-muted">
{{ form.ctf_logo.description }}
</small>
</div>
<div class="form-group">
<b>{{ form.ctf_banner.label }}</b>
{{ form.ctf_banner(class="form-control-file", accept="image/*") }}
<small class="form-text text-muted">
{{ form.ctf_banner.description }}
</small>
</div>
<div class="form-group">
<b>{{ form.ctf_small_icon.label }}</b>
{{ form.ctf_small_icon(class="form-control-file", accept=".png") }}
<small class="form-text text-muted">
{{ form.ctf_small_icon.description }}
</small>
</div>
<div class="form-group">
<b>{{ form.ctf_theme.label }}</b>
{{ form.ctf_theme(class="form-control custom-select") }}
<small class="form-text text-muted">
{{ form.ctf_theme.description }}
</small>
</div>
<div class="form-group">
<b>{{ form.theme_color.label }}</b>
<br>
<div class="d-inline-block">
{{ form.theme_color(id="config-color-input") }}
<div class="btn-group">
<input type="color" id="config-color-picker" class="pr-1" style="width: 100px; height: 30px;" value="">
</div>
<div class="btn-group">
<button type="button" id="config-color-reset">Reset</button>
</div>
</div>
<small class="form-text text-muted">
{{ form.theme_color.description }}
</small>
</div>
<div class="text-right">
<button type="button" class="btn btn-primary btn-outlined tab-next" data-href="#datetime">
Next
</button>
</div>
</div>
<div class="tab-pane fade" id="datetime" role="tabpanel">
<div class="form-group">
<b>{{ form.start.label }}</b>
<div class="row">
<div class="col-md-4">
<label>Date</label>
<input class="form-control" id="start-date" type="date" placeholder="yyyy-mm-dd" data-preview="#start"/>
</div>
<div class="col-md-4">
<label>Time</label>
<input class="form-control" id="start-time" type="time" placeholder="hh:mm" data-preview="#start"/>
</div>
<div class="col-md-4">
<label>UTC Preview</label>
{{ form.start(class="form-control", id="start-preview", readonly=True) }}
</div>
</div>
<small class="form-text text-muted">
{{ form.start.description }}
</small>
</div>
<div class="form-group">
<b>{{ form.end.label }}</b>
<div class="row">
<div class="col-md-4">
<label>Date</label>
<input class="form-control" id="end-date" type="date" placeholder="yyyy-mm-dd" data-preview="#end"/>
</div>
<div class="col-md-4">
<label>Time</label>
<input class="form-control" id="end-time" type="time" placeholder="hh:mm" data-preview="#end"/>
</div>
<div class="col-md-4">
<label>UTC Preview</label>
{{ form.start(class="form-control", id="end-preview", readonly=True) }}
</div>
</div>
<small class="form-text text-muted">
{{ form.end.description }}
</small>
</div>
<div class="text-right">
<button type="button" class="btn btn-primary btn-outlined tab-next" data-href="#integrations">
Next
</button>
</div>
</div>
<div class="tab-pane fade" id="integrations" role="tabpanel">
<div class="form-group">
<h4>MajorLeagueCyber Integration</h4>
<p>
MajorLeagueCyber (MLC) is a cyber security event tracker written and maintained by the developers of CTFd.
Set up MLC integration to:
<ul>
<li>display your event on the MLC website and mailing list</li>
<li>share and track participant statistics</li>
<li>provide live updates in team Slack or Discord groups</li>
<li>archive challenges, team participation & more</li>
</ul>
</p>
<button type="button" id="integration-mlc" class="btn btn-primary btn-block">
Setup
</button>
</div>
<br>
<hr>
<br>
<div class="submit-row text-right">
{{ form.submit(class="btn btn-md btn-primary btn-outlined") }}
</div>
</div>
</div>
{{ form.nonce() }}
</form>
{% endwith %}
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
var STATE = {{ state | tojson }};
</script>
{% endblock %}
{% block entrypoint %}
<script defer src="{{ url_for('views.themes', path='js/pages/setup.js') }}"></script>
{% endblock %}