blob: d7c17c8b0c3ca7e401f037a9a40916ccc1971f86 [file] [log] [blame]
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01001<div class="tab-content" style="padding-top:20px">
2 <div role="tabpanel" class="tab-pane active" id="tab-config-admins">
3 <div class="panel panel-danger">
4 <div class="panel-heading xs-show">{{ lang.admin.admin_details }}</div>
5 <div class="panel-body">
6 <div class="table-responsive">
7 <table class="table table-striped table-condensed" id="adminstable"></table>
8 </div>
9 <div class="mass-actions-admin">
10 <div class="btn-group">
11 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="toggle_multi_select_all" data-id="admins" href="#"><i class="bi bi-check-all"></i> {{ lang.mailbox.toggle_all }}</a>
12 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default dropdown-toggle" data-toggle="dropdown" href="#">{{ lang.mailbox.quick_actions }} <span class="caret"></span></a>
13 <div class="clearfix visible-xs"></div>
14 <ul class="dropdown-menu">
15 <li><a data-action="edit_selected" data-id="admins" data-api-url='edit/admin' data-api-attr='{"active":"1"}' href="#">{{ lang.mailbox.activate }}</a></li>
16 <li><a data-action="edit_selected" data-id="admins" data-api-url='edit/admin' data-api-attr='{"active":"0"}' href="#">{{ lang.mailbox.deactivate }}</a></li>
17 <li role="separator" class="divider"></li>
18 <li><a data-action="edit_selected" data-id="admins" data-api-url='edit/admin' data-api-attr='{"disable_tfa":"1"}' href="#">{{ lang.tfa.disable_tfa }}</a></li>
19 <li role="separator" class="divider"></li>
20 <li><a data-action="delete_selected" data-id="admins" data-api-url='delete/admin' href="#">{{ lang.mailbox.remove }}</a></li>
21 </ul>
22 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-id="add_admin" data-toggle="modal" data-target="#addAdminModal" href="#"><i class="bi bi-person-plus-fill"></i> {{ lang.admin.add_admin }}</a>
23 </div>
24 </div>
25
26 {# TFA #}
27 <legend style="margin-top:20px">
28 {{ lang.tfa.tfa }}
29 </legend>
30 <div class="row">
31 <div class="col-sm-3 col-xs-5 text-right">{{ lang.tfa.tfa }}:</div>
32 <div class="col-sm-9 col-xs-7">
33 <p id="tfa_pretty">{{ tfa_data.pretty }}</p>
34 {% include 'tfa_keys.twig' %}
35 <br>
36 </div>
37 </div>
38 <div class="row">
39 <div class="col-sm-3 col-xs-5 text-right">{{ lang.tfa.set_tfa }}:</div>
40 <div class="col-sm-9 col-xs-7">
41 <select data-style="btn btn-sm dropdown-toggle bs-placeholder btn-default" data-width="fit" id="selectTFA" class="selectpicker" title="{{ lang.tfa.select }}">
42 <option value="yubi_otp">{{ lang.tfa.yubi_otp }}</option>
43 <option value="u2f">{{ lang.tfa.u2f }}</option>
44 <option value="totp">{{ lang.tfa.totp }}</option>
45 <option value="none">{{ lang.tfa.none }}</option>
46 </select>
47 </div>
48 </div>
49
50 {# FIDO2 #}
51 <legend style="margin-top:20px">
52 <i class="bi bi-shield-fill-check"></i>
53 {{ lang.fido2.fido2_auth }}</legend>
54 <div class="row">
55 <div class="col-sm-3 col-xs-12 text-right text-xs-left space20">{{ lang.fido2.known_ids }}:</div>
56 <div class="col-sm-9 col-xs-12">
57 <div class="table-responsive">
58 <table class="table table-striped table-hover table-condensed" id="fido2_keys">
59 <tr>
60 <th>ID</th>
61 <th style="min-width:240px;text-align: right">{{ lang.admin.action }}</th>
62 </tr>
63 {% include 'fido2.twig' %}
64 </table>
65 </div>
66 <br>
67 </div>
68 </div>
69 <div class="row">
70 <div class="col-sm-offset-3 col-sm-9">
71 <div class="btn-group nowrap">
72 <button class="btn btn-sm btn-primary visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline" id="register-fido2">{{ lang.fido2.set_fido2 }}</button>
73 <button type="button" class="btn btn-sm btn-xs-lg btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
74 <span class="caret"></span>
75 </button>
76 <ul class="dropdown-menu">
77 <li><a href="#" id="register-fido2-touchid" style="line-height:1.4;"><i class="bi bi-apple"></i> {{ lang.fido2.set_fido2_touchid }}</a></li>
78 </ul>
79 </div>
80 </div>
81 </div>
82 <br>
83 <div class="row" id="status-fido2">
84 <div class="col-sm-3 col-xs-5 text-right">{{ lang.fido2.register_status }}:</div>
85 <div class="col-sm-9 col-xs-7">
86 <div id="fido2-alerts">-</div>
87 </div>
88 <br>
89 </div>
90
91 <legend style="cursor:pointer;margin-top:40px" data-target="#license" unselectable="on" data-toggle="collapse">
92 <i style="font-size:10pt;" class="bi bi-plus-square"></i> {{ lang.admin.guid_and_license }}
93 </legend>
94 <div id="license" class="collapse">
95 <form class="form-horizontal" autocapitalize="none" autocorrect="off" role="form" method="post">
96 <div class="form-group">
97 <label class="control-label col-sm-3" for="guid">{{ lang.admin.guid }}:</label>
98 <div class="col-sm-9">
99 <div class="input-group">
100 <span class="input-group-addon">
101 <i class="bi bi-suit-heart{% if gal.valid == true %}-fill text-danger{% endif %}"></i>
102 </span>
103 <input type="text" id="guid" class="form-control" value="{{ license_guid }}" readonly>
104 </div>
105 <p class="help-block">
106 {{ lang.admin.customer_id }}: {{ gal.c|default('?')|raw }} -
107 {{ lang.admin.service_id }}: {{ gal.s|default('?')|raw }} -
108 {{ lang.admin.sal_level }}: {{ gal.m|default('?')|raw }}
109 </p>
110 </div>
111 </div>
112 <div class="form-group">
113 <div class="col-sm-offset-3 col-sm-9">
114 <p class="help-block">{{ lang.admin.license_info|raw }}</p>
115 <div class="btn-group">
116 <button class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" name="license_validate_now" type="submit" href="#">{{ lang.admin.validate_license_now }}</button>
117 </div>
118 </div>
119 </div>
120 </form>
121 </div>
122
123 <legend style="cursor:pointer;" data-target="#admin_api" unselectable="on" data-toggle="collapse">
124 <i style="font-size:10pt;" class="bi bi-plus-square"></i> API
125 </legend>
126 <div id="admin_api" class="collapse">
127 <div class="row">
128 <div class="col-lg-12">
129 <p class="help-block">{{ lang.admin.api_info|raw }}</p>
130 </div>
131 <div class="col-lg-6">
132 <div class="panel panel-default">
133 <div class="panel-heading">
134 <h4 class="panel-title"><i class="bi bi-file-earmark-arrow-down"></i> {{ lang.admin.api_read_only }}</h4>
135 </div>
136 <div class="panel-body">
137 <form class="form-horizontal" autocapitalize="none" autocorrect="off" role="form" method="post">
138 <div class="form-group">
139 <label class="control-label col-sm-3" for="allow_from_ro">{{ lang.admin.api_allow_from }}:</label>
140 <div class="col-sm-9">
141 <textarea class="form-control textarea-code" rows="7" name="allow_from" id="allow_from_ro" {% if api.ro.skip_ip_check %}disabled{% endif %} required>{{ api.ro.allow_from }}</textarea>
142 </div>
143 </div>
144 <div class="form-group">
145 <div class="col-sm-offset-3 col-sm-9">
146 <label>
147 <input type="checkbox" name="skip_ip_check" id="skip_ip_check_ro" {% if api.ro.skip_ip_check %}checked{% endif %}> {{ lang.admin.api_skip_ip_check }}
148 </label>
149 </div>
150 </div>
151 <div class="form-group">
152 <label class="control-label col-sm-3">{{ lang.admin.api_key }}:</label>
153 <div class="col-sm-9">
154 <pre>{{ api.ro.api_key|default('-') }}</pre>
155 </div>
156 </div>
157 <div class="form-group">
158 <div class="col-sm-offset-3 col-sm-9">
159 <label>
160 <input type="checkbox" name="active" {% if api.ro.active %}checked{% endif %}> {{ lang.admin.activate_api }}
161 </label>
162 </div>
163 </div>
164 <div class="form-group">
165 <div class="col-sm-offset-3 col-sm-9">
166 <div class="btn-group">
167 <button class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" name="admin_api[ro]" type="submit" href="#"><i class="bi bi-check-lg"></i> {{ lang.admin.save }}</button>
168 <button class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default admin-ays-dialog" name="admin_api_regen_key[ro]" type="submit" href="#" {% if not api.ro.api_key %}disabled{% endif %}>{{ lang.admin.regen_api_key }}</button>
169 </div>
170 </div>
171 </div>
172 </form>
173 </div>
174 </div>
175 </div>
176 <div class="col-lg-6">
177 <div class="panel panel-default">
178 <div class="panel-heading">
179 <h4 class="panel-title"><i class="bi bi-file-earmark-diff"></i> {{ lang.admin.api_read_write }}</h4>
180 </div>
181 <div class="panel-body">
182 <form class="form-horizontal" autocapitalize="none" autocorrect="off" role="form" method="post">
183 <div class="form-group">
184 <label class="control-label col-sm-3" for="allow_from_rw">{{ lang.admin.api_allow_from }}:</label>
185 <div class="col-sm-9">
186 <textarea class="form-control textarea-code" rows="7" name="allow_from" id="allow_from_rw" {% if api.rw.skip_ip_check %}disabled{% endif %} required>{{ api.rw.allow_from }}</textarea>
187 </div>
188 </div>
189 <div class="form-group">
190 <div class="col-sm-offset-3 col-sm-9">
191 <label>
192 <input type="checkbox" name="skip_ip_check" id="skip_ip_check_rw" {% if api.rw.skip_ip_check %}checked{% endif %}> {{ lang.admin.api_skip_ip_check }}
193 </label>
194 </div>
195 </div>
196 <div class="form-group">
197 <label class="control-label col-sm-3" for="admin_api_key">{{ lang.admin.api_key }}:</label>
198 <div class="col-sm-9">
199 <pre>{{ api.rw.api_key|default('-') }}</pre>
200 </div>
201 </div>
202 <div class="form-group">
203 <div class="col-sm-offset-3 col-sm-9">
204 <label>
205 <input type="checkbox" name="active" {% if api.rw.active %}checked{% endif %}> {{ lang.admin.activate_api }}
206 </label>
207 </div>
208 </div>
209 <div class="form-group">
210 <div class="col-sm-offset-3 col-sm-9">
211 <div class="btn-group">
212 <button class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" name="admin_api[rw]" type="submit" href="#"><i class="bi bi-check-lg"></i> {{ lang.admin.save }}</button>
213 <button class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default admin-ays-dialog" name="admin_api_regen_key[rw]" type="submit" {% if not api.rw.api_key %}disabled{% endif %} href="#">{{ lang.admin.regen_api_key }}</button>
214 </div>
215 </div>
216 </div>
217 </form>
218 </div>
219 </div>
220 </div>
221 </div>
222 </div>
223 </div>
224 </div>
225
226 <div class="panel panel-default">
227 <div class="panel-heading xs-show">{{ lang.admin.domain_admins }}</div>
228 <div class="panel-body">
229 <div class="table-responsive">
230 <table class="table table-striped table-condensed" id="domainadminstable"></table>
231 </div>
232 <div class="mass-actions-admin">
233 <div class="btn-group">
234 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="toggle_multi_select_all" data-id="domain_admins" href="#"><i class="bi bi-check-all"></i> {{ lang.mailbox.toggle_all }}</a>
235 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default dropdown-toggle" data-toggle="dropdown" href="#">{{ lang.mailbox.quick_actions }} <span class="caret"></span></a>
236 <ul class="dropdown-menu">
237 <li><a data-action="edit_selected" data-id="domain_admins" data-api-url='edit/domain-admin' data-api-attr='{"active":"1"}' href="#">{{ lang.mailbox.activate }}</a></li>
238 <li><a data-action="edit_selected" data-id="domain_admins" data-api-url='edit/domain-admin' data-api-attr='{"active":"0"}' href="#">{{ lang.mailbox.deactivate }}</a></li>
239 <li role="separator" class="divider"></li>
240 <li><a data-action="edit_selected" data-id="domain_admins" data-api-url='edit/domain-admin' data-api-attr='{"disable_tfa":"1"}' href="#">{{ lang.tfa.disable_tfa }}</a></li>
241 <li role="separator" class="divider"></li>
242 <li><a data-action="delete_selected" data-id="domain_admins" data-api-url='delete/domain-admin' href="#">{{ lang.mailbox.remove }}</a></li>
243 </ul>
244 <div class="clearfix visible-xs"></div>
245 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-id="add_domain_admin" data-toggle="modal" data-target="#addDomainAdminModal" href="#"><i class="bi bi-person-plus-fill"></i> {{ lang.admin.add_domain_admin }}</a>
246 </div>
247 </div>
248 </div>
249 </div>
250</div>