-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathconfig.html
More file actions
executable file
·323 lines (305 loc) · 20.4 KB
/
config.html
File metadata and controls
executable file
·323 lines (305 loc) · 20.4 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
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<table style="width:100%">
<tr>
<td id="config-details" class="well">
<div class="navbar">
<div class="navbar-inner">
<div class="brand">System Config</div>
</div>
</div>
<div id="config-form">
<div class="section versions">
<b>Database Version:</b> {{Config.db_version}}<br/>
<b>DSP Version:</b> {{Config.dsp_version}}
<span ng-show="Config.upgrade_available===false">
(Up to date)
</span>
<div ng-show="Config.upgrade_available===true">
DSP Version {{Config.latest_version}} is available!
<button ng-click="upgrade()" class="btn btn-success">Upgrade Now</button>
</div>
</div>
<div class="section">
<h5>CORS Access</h5>
<label>Choose which hosts have cross domain access to your DSP</label>
<button ng-click="promptForNew()" class="btn btn-success"><li class="icon-add"></li> Add New Host</button>
<br/><br/>
<table id="cors-list" class="table table-hover table-striped">
<tbody>
<tr>
<th></th>
<th>Host</th>
<th>Allowed Verbs</th>
<th>Enabled</th>
</tr>
<tr ng-repeat="host in Config.allowed_hosts">
<td>
<li ng-click="removeHost()" class="btn btn-danger icon-remove"></li>
</td>
<td><input placeholder="Enter Host Name" type="text" ng-model="host.host"/></td>
<td>
<label><input ng-click="selectAll($event)" ng-checked="host.verbs.length == allVerbs.length" type="checkbox"/> ALL</li></label>
<label ng-repeat = "verb in allVerbs"><input ng-click="toggleVerb()" ng-disabled="host.verbs.length == allVerbs.length" ng-checked="host.verbs.indexOf(verb) != -1 " type="checkbox"/> {{verb}}</label>
</td>
<td>
<input type="checkbox" ng-model="host.is_enabled"/>
</td>
</tr>
</table>
<!--<input type="text" placeholder="Enter Host Name" ng-model="CORS.host.name"/>-->
<!--<button cls="btn btn-primary" ng-click="addHost()">Add Host</button>-->
</div>
<div class="section">
<h5>Guest Users</h5>
<div class="alert alert-info">
<li class="icon-info-sign"></li>
If enabled, the DSP is available with no sign-in required and all guest users will be
assigned the selected role. If disabled, sign-in is required.
</div>
<input type="checkbox" ng-checked="Config.allow_guest_user" ng-model="Config.allow_guest_user"/> Allow
guest users
<br/>
<br/>
<div>
<p>Assign a Role for Guest Users</p>
<div>
<select data-ng-disabled="!Config.allow_guest_user"
data-ng-model="Config.guest_role_id"
data-ng-options="role.id as role.name for role in Roles.record"
data-ng-selected="Config.guest_role_id">
<option value="">- - None - -</option>
</select>
</div>
</div>
</div>
<div class="section">
<h5>Open Registration</h5>
<div class="alert alert-info">
<li class="icon-info-sign"></li>
If enabled, new users can add themselves as users to this DSP and will be assigned the
selected role. If disabled, only an admin can add new users to this DSP.
</div>
<input type="checkbox" ng-checked="Config.allow_open_registration"
ng-model="Config.allow_open_registration"/> Allow open registration
<br/>
<br/>
<div>
<p>Assign default role for open registration users</p>
<div>
<select data-ng-disabled="!Config.allow_open_registration"
data-ng-model="Config.open_reg_role_id"
data-ng-options="role.id as role.name for role in Roles.record"
data-ng-selected="Config.open_reg_role_id">
<option value="">- - None - -</option>
</select>
</div>
</div>
<div>
<p>Select an email service if you want to require email confirmation for open registration</p>
<div>
<select data-ng-disabled="!Config.allow_open_registration"
data-ng-model="Config.open_reg_email_service_id"
data-ng-options="svc.id as svc.name for svc in Service.record | filter: {type:'email'}"
data-ng-selected="Config.open_reg_email_service_id">
<option value="">- - None - -</option>
</select>
</div>
</div>
<div>
<p>Optionally select an email template for open registration</p>
<div>
<select data-ng-disabled="!Config.allow_open_registration || !Config.open_reg_email_service_id"
data-ng-model="Config.open_reg_email_template_id"
data-ng-options="template.id as template.name for template in emailTemplates.record"
data-ng-selected="Config.open_reg_email_template_id">
<option value="">- - None - -</option>
</select>
</div>
</div>
</div>
<div class="section">
<h5>Password Reset</h5>
<div class="alert alert-info">
<li class="icon-info-sign"></li>
To enable password reset via email confirmation, select an email service and template below. Leave it set to --None-- to disable password resets via email and use security question/answer.
</div>
<div>
<p>Select an email service for password reset email confirmation</p>
<div>
<select data-ng-model="Config.password_email_service_id"
data-ng-options="svc.id as svc.name for svc in Service.record | filter: {type:'email'}"
data-ng-selected="Config.password_email_service_id">
<option value="">- - None - -</option>
</select>
</div>
</div>
<div>
<p>Optionally select an email template for password reset</p>
<div>
<select data-ng-disabled="!Config.password_email_service_id"
data-ng-model="Config.password_email_template_id"
data-ng-options="template.id as template.name for template in emailTemplates.record"
data-ng-selected="Config.password_email_template_id">
<option value="">- - None - -</option>
</select>
</div>
</div>
</div>
<!-- Add email template section -->
<div class="section">
<h5>Email Templates</h5>
<div class="alert alert-info">
<li class="icon-info-sign"></li>
Create a new email template or modify an existing one.
</div>
<select
data-ng-model="selectedEmailTemplateId"
data-ng-options="email.id as email.name for email in emailTemplates.record | filter: emailTemplatesFilter">
<option value="">- - Select a template - -</option>
</select>
<input data-ng-model="emailTemplatesFilter" type="text" placeholder="Filter By Name" />
<div class="btn-group pull-right">
<button type="button" class="btn" data-ng-click="newEmailTemplate()">New</button>
<button type="button" class="btn" data-ng-click="saveEmailTemplate(getSelectedEmailTemplate)">Save</button>
<button type="button" class="btn" data-ng-click="duplicateEmailTemplate()">Duplicate</button>
<button type="button" class="btn btn-danger" data-ng-click="deleteEmailTemplate(getSelectedEmailTemplate.id)">Delete</button>
</div>
<form novalidate>
<div class="tabbable tabs-left">
<ul class="nav nav-tabs" style="margin-right: 0">
<li data-ng-class="templateInfo={true: 'active', false: ''}[currentCreateEmailTab=='template-info-pane']"><a href="javascript:void(0)" data-ng-click="showCreateEmailTab('template-info-pane')"
data-toggle="tab">Template Info</a></li>
<li data-ng-class="templateTo={true: 'active', false: ''}[currentCreateEmailTab=='template-to-pane']"><a href="javascript:void(0)" data-ng-click="showCreateEmailTab('template-to-pane')"
data-toggle="tab">Template To</a></li>
<li data-ng-class="templateBody={true: 'active', false: ''}[currentCreateEmailTab=='template-body-pane']"><a href="javascript:void(0)" data-ng-click="showCreateEmailTab('template-body-pane')"
data-toggle="tab">Template Body</a></li>
<li data-ng-class="templateReply={true: 'active', false: ''}[currentCreateEmailTab=='template-reply-pane']"><a href="javascript:void(0)" data-ng-click="showCreateEmailTab('template-reply-pane')"
data-toggle="tab">Template From</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" data-ng-class="templateInfo" id="template-info-pane">
<div style="padding: 20px 10px 0 40px; background: white; border: 1px solid #dddddd; border-left: none">
<p>
<label for="template-name">Template Name:</label>
<input type="text"
name="template-name"
id="template-name"
data-ng-model="getSelectedEmailTemplate.name"
placeholder="Required"
required>
</p>
<p>
<label for="template-description">Template Description:</label>
<textarea
style="resize: none"
name="template-description"
id="template-description"
data-ng-model="getSelectedEmailTemplate.description"></textarea>
</p>
</div>
</div>
<div class="tab-pane" data-ng-class="templateTo" id="template-to-pane">
<div style="padding: 20px 10px 0 40px; background: white; border: 1px solid #dddddd; border-left: none">
<p>
<label for="template-to">To:</label>
<input type="text"
name="template-to"
id="template-to"
data-ng-model="getSelectedEmailTemplate.to">
</p>
<p>
<label for="template-cc">CC:</label>
<input type="text"
name="template-cc"
id="template-cc"
data-ng-model="getSelectedEmailTemplate.cc">
</p>
<p>
<label for="template-bcc">BCC:</label>
<input type="text"
name="template-bcc"
id="template-bcc"
data-ng-model="getSelectedEmailTemplate.bcc">
</p>
</div>
</div>
<div class="tab-pane" data-ng-class="templateBody" id="template-body-pane">
<div style="padding: 20px 10px 0 40px; background: white; border: 1px solid #dddddd; border-left: none">
<p>
<label for="template-subject">Subject:</label>
<input style="width: 80%"
type="text"
name="template-subject"
id="template-subject"
size="120"
data-ng-model="getSelectedEmailTemplate.subject">
</p>
<!--
<p style="display: inline-block; float:left;">
<label for="template-body-text">Body Text:</label>
<textarea style="width: 300px; resize: none"
rows="5"
cols="250"
name="template-body-text"
id="template-body-text"
data-ng-model="getSelectedEmailTemplate.body_text"></textarea>
</p>
-->
<p style="display: inline-block;">
<label for="template-body-html">Body:</label>
<textarea style="width: 80%; resize: none"
rows="5"
cols="250"
name="template-body-html"
id="template-body-html"
data-ng-model="getSelectedEmailTemplate.body_html"></textarea>
</p>
</div>
</div>
<div class="tab-pane" data-ng-class="templateReply" id="template-reply-pane">
<div style="padding: 10px 10px 0 40px; background: white; border: 1px solid #dddddd; border-left: none">
<div style="display: inline-block;">
<h6>From:</h6>
<p>
<label for="template-from-name">From Name:</label>
<input type="text"
name="template-from-name"
id="template-from-name"
data-ng-model="getSelectedEmailTemplate.from_name">
</p>
<p>
<label for="template-from-email">From Email:</label>
<input type="text"
name="template-from-email"
id="template-from-email"
data-ng-model="getSelectedEmailTemplate.from_email">
</p>
</div>
<div style="display:inline-block; margin-left: 40px">
<h6>Reply:</h6>
<p>
<label for="template-reply-to-name">Reply To Name:</label>
<input type="text"
name="template-reply-to-name"
id="template-reply-to-name"
data-ng-model="getSelectedEmailTemplate.reply_to_name">
</p>
<p>
<label for="template-reply-to-email">Reply To Email:</label>
<input type="text"
name="template-reply-to-email"
id="template-reply-to-email"
data-ng-model="getSelectedEmailTemplate.reply_to_email">
</p>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<br/>
<button ng-click="save()" class="btn btn-primary">Save</button>
</div>
</td>
</tr>
</table>