blob: e796d2e13bef7107639d797ab1eaf94fbb50309b [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001<?php
2if (!isset($_SESSION['mailcow_cc_role'])) {
3 header('Location: /');
4 exit();
5}
6?>
7<!-- add settings rule modal -->
8<div class="modal fade" id="addRsettingModal" tabindex="-1" role="dialog" aria-hidden="true">
9 <div class="modal-dialog modal-lg">
10 <div class="modal-content">
11 <div class="modal-header">
12 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
13 <h3 class="modal-title"><?=$lang['admin']['add_settings_rule'];?></h3>
14 </div>
15 <div class="modal-body">
16 <form class="form-horizontal" data-cached-form="true" data-id="rsetting" role="form" method="post">
17 <div class="form-group">
18 <label class="control-label col-sm-2" for="desc"><?=$lang['admin']['rsetting_desc'];?>:</label>
19 <div class="col-sm-10">
20 <input type="text" class="form-control" id="adminRspamdSettingsDesc" name="desc" required>
21 </div>
22 </div>
23 <div class="form-group">
24 <label class="control-label col-sm-2" for="content"><?=$lang['admin']['rsetting_content'];?>:</label>
25 <div class="col-sm-10">
26 <textarea class="form-control" id="adminRspamdSettingsContent" name="content" rows="10"><?=$rsetting_details['content'];?></textarea>
27 </div>
28 </div>
29 <div class="form-group">
30 <div class="col-sm-offset-2 col-sm-10">
31 <div class="checkbox">
32 <label><input type="checkbox" value="1" name="active" checked> <?=$lang['admin']['active'];?></label>
33 </div>
34 </div>
35 </div>
36 <div class="form-group">
37 <div class="col-sm-offset-2 col-sm-10">
38 <button class="btn btn-default" data-action="add_item" data-id="rsetting" data-api-url='add/rsetting' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> <?=$lang['admin']['add'];?></button>
39 </div>
40 </div>
41 </form>
42 <hr>
43 <p><?=$lang['admin']['rspamd-com_settings'];?></p>
44 <ul id="rspamd_presets"></ul>
45 </div>
46 </div>
47 </div>
48</div><!-- add settings rule modal -->
49<!-- add domain admin modal -->
50<div class="modal fade" id="addDomainAdminModal" tabindex="-1" role="dialog" aria-hidden="true">
51 <div class="modal-dialog modal-lg">
52 <div class="modal-content">
53 <div class="modal-header">
54 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
55 <h3 class="modal-title"><?=$lang['admin']['add_domain_admin'];?></h3>
56 </div>
57 <div class="modal-body">
58 <form class="form-horizontal" data-cached-form="true" data-id="add_domain_admin" role="form" method="post" autocomplete="off">
59 <div class="form-group">
60 <label class="control-label col-sm-2" for="username"><?=$lang['admin']['username'];?>:</label>
61 <div class="col-sm-10">
62 <input type="text" class="form-control" name="username" required>
63 &rdsh; <kbd>a-z A-Z - _ .</kbd>
64 </div>
65 </div>
66 <div class="form-group">
67 <label class="control-label col-sm-2" for="name"><?=$lang['admin']['admin_domains'];?>:</label>
68 <div class="col-sm-10">
69 <select title="<?=$lang['admin']['search_domain_da'];?>" class="full-width-select" name="domains" size="5" multiple>
70 <?php
71 foreach (mailbox('get', 'domains') as $domain) {
72 echo "<option>".htmlspecialchars($domain)."</option>";
73 }
74 ?>
75 </select>
76 </div>
77 </div>
78 <div class="form-group">
79 <label class="control-label col-sm-2" for="password"><?=$lang['admin']['password'];?> (<a href="#" class="generate_password"><?=$lang['admin']['generate'];?></a>)</label>
80 <div class="col-sm-10">
81 <input type="password" class="form-control" data-pwgen-field="true" data-hibp="true" name="password" placeholder="" autocomplete="new-password" required>
82 </div>
83 </div>
84 <div class="form-group">
85 <label class="control-label col-sm-2" for="password2"><?=$lang['admin']['password_repeat'];?>:</label>
86 <div class="col-sm-10">
87 <input type="password" class="form-control" data-pwgen-field="true" name="password2" placeholder="" autocomplete="new-password" required>
88 </div>
89 </div>
90 <div class="form-group">
91 <div class="col-sm-offset-2 col-sm-10">
92 <div class="checkbox">
93 <label><input type="checkbox" value="1" name="active" checked> <?=$lang['admin']['active'];?></label>
94 </div>
95 </div>
96 </div>
97 <div class="form-group">
98 <div class="col-sm-offset-2 col-sm-10">
99 <button class="btn btn-default" data-action="add_item" data-id="add_domain_admin" data-api-url='add/domain-admin' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> <?=$lang['admin']['add'];?></button>
100 </div>
101 </div>
102 </form>
103 </div>
104 </div>
105 </div>
106</div><!-- add domain admin modal -->
107<!-- change fido2 fn -->
108<div class="modal fade" id="fido2ChangeFn" tabindex="-1" role="dialog" aria-hidden="true">
109 <div class="modal-dialog modal-lg">
110 <div class="modal-content">
111 <div class="modal-header">
112 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
113 <h3 class="modal-title"><?=$lang['fido2']['set_fn'];?></h3>
114 <p class="help-block" style="word-break:break-all" id="fido2_subject_desc" data-fido2-subject=""></p>
115 </div>
116 <div class="modal-body">
117 <form class="form-horizontal" data-cached-form="false" data-id="fido2ChangeFn" role="form" method="post" autocomplete="off">
118 <input type="hidden" class="form-control" name="fido2_cid" id="fido2_cid">
119 <div class="form-group">
120 <label class="control-label col-sm-4" for="fido2_fn"><?=$lang['fido2']['fn'];?>:</label>
121 <div class="col-sm-8">
122 <input type="text" class="form-control" name="fido2_fn">
123 </div>
124 </div>
125 <div class="form-group">
126 <div class="col-sm-offset-4 col-sm-8">
127 <button class="btn btn-default" data-action="edit_selected" data-id="fido2ChangeFn" data-item="null" data-api-url='edit/fido2-fn' data-api-attr='{}' href="#"><?=$lang['admin']['save'];?></button>
128 </div>
129 </div>
130 </form>
131 </div>
132 </div>
133 </div>
134</div><!-- add domain admin modal -->
135<!-- add oauth2 client modal -->
136<div class="modal fade" id="addOAuth2ClientModal" tabindex="-1" role="dialog" aria-hidden="true">
137 <div class="modal-dialog modal-lg">
138 <div class="modal-content">
139 <div class="modal-header">
140 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
141 <h3 class="modal-title">OAuth2</h3>
142 </div>
143 <div class="modal-body">
144 <form class="form-horizontal" data-cached-form="true" data-id="add_oauth2_client" role="form" method="post">
145 <div class="form-group">
146 <label class="control-label col-sm-2" for="redirect_uri"><?=$lang['admin']['oauth2_redirect_uri'];?>:</label>
147 <div class="col-sm-10">
148 <input type="text" class="form-control" name="redirect_uri" required>
149 </div>
150 </div>
151 <div class="form-group">
152 <div class="col-sm-offset-2 col-sm-10">
153 <button class="btn btn-default" data-action="add_item" data-id="add_oauth2_client" data-api-url='add/oauth2-client' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> <?=$lang['admin']['add'];?></button>
154 </div>
155 </div>
156 </form>
157 </div>
158 </div>
159 </div>
160</div><!-- add domain admin modal -->
161<!-- add admin modal -->
162<div class="modal fade" id="addAdminModal" tabindex="-1" role="dialog" aria-hidden="true">
163 <div class="modal-dialog modal-lg">
164 <div class="modal-content">
165 <div class="modal-header">
166 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
167 <h3 class="modal-title"><?=$lang['admin']['add_admin'];?></h3>
168 </div>
169 <div class="modal-body">
170 <form class="form-horizontal" data-cached-form="true" data-id="add_admin" role="form" method="post" autocomplete="off">
171 <div class="form-group">
172 <label class="control-label col-sm-2" for="username"><?=$lang['admin']['username'];?>:</label>
173 <div class="col-sm-10">
174 <input type="text" class="form-control" name="username" required>
175 &rdsh; <kbd>a-z A-Z - _ .</kbd>
176 </div>
177 </div>
178 <div class="form-group">
179 <label class="control-label col-sm-2" for="password"><?=$lang['admin']['password'];?> (<a href="#" class="generate_password"><?=$lang['admin']['generate'];?></a>):</label>
180 <div class="col-sm-10">
181 <input type="password" class="form-control" data-pwgen-field="true" data-hibp="true" name="password" placeholder="" autocomplete="new-password" required>
182 </div>
183 </div>
184 <div class="form-group">
185 <label class="control-label col-sm-2" for="password2"><?=$lang['admin']['password_repeat'];?>:</label>
186 <div class="col-sm-10">
187 <input type="password" class="form-control" data-pwgen-field="true" name="password2" placeholder="" autocomplete="new-password" required>
188 </div>
189 </div>
190 <div class="form-group">
191 <div class="col-sm-offset-2 col-sm-10">
192 <div class="checkbox">
193 <label><input type="checkbox" value="1" name="active" checked> <?=$lang['admin']['active'];?></label>
194 </div>
195 </div>
196 </div>
197 <div class="form-group">
198 <div class="col-sm-offset-2 col-sm-10">
199 <button class="btn btn-default" data-action="add_item" data-id="add_admin" data-api-url='add/admin' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> <?=$lang['admin']['add'];?></button>
200 </div>
201 </div>
202 </form>
203 </div>
204 </div>
205 </div>
206</div><!-- add admin modal -->
207<!-- test transport modal -->
208<div class="modal fade" id="testTransportModal" tabindex="-1" role="dialog" aria-hidden="true">
209 <div class="modal-dialog modal-lg">
210 <div class="modal-content">
211 <div class="modal-header">
212 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
213 <h3 class="modal-title"><span class="glyphicon glyphicon-stats"></span> Transport</h3>
214 </div>
215 <div class="modal-body">
216 <form class="form-horizontal" data-cached-form="true" id="test_transport_form" role="form" method="post">
217 <input type="hidden" class="form-control" name="transport_id" id="transport_id">
218 <input type="hidden" class="form-control" name="transport_type" id="transport_type">
219 <div class="form-group">
220 <label class="control-label col-sm-2" for="mail_from"><?=$lang['admin']['relay_from'];?></label>
221 <div class="col-sm-10">
222 <input type="text" class="form-control" name="mail_from" placeholder="relay@example.org">
223 </div>
224 </div>
225 <div class="form-group">
226 <div class="col-sm-offset-2 col-sm-10">
227 <button class="btn btn-default" id="test_transport" href="#"><?=$lang['admin']['relay_run'];?></button>
228 </div>
229 </div>
230 </form>
231 <hr>
232 <div id="test_transport_result" style="font-size:10pt">-</div>
233 </div>
234 </div>
235 </div>
236</div><!-- test transport modal -->
237<!-- show queue item modal -->
238<div class="modal fade" id="showQueuedMsg" tabindex="-1" role="dialog" aria-hidden="true">
239 <div class="modal-dialog modal-lg">
240 <div class="modal-content">
241 <div class="modal-header">
242 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
243 <h3 class="modal-title"><span class="glyphicon glyphicon-hourglass" style="font-size:18px"></span> ID <span id="queue_id"></span></h3>
244 </div>
245 <div class="modal-body">
246 <textarea class="form-control" id="queue_msg_content" name="content" rows="40"></textarea>
247 </div>
248 </div>
249 </div>
250</div><!-- show queue item modal -->
251<!-- priv key modal -->
252<div class="modal fade" id="showDKIMprivKey" tabindex="-1" role="dialog" aria-hidden="true">
253 <div class="modal-dialog">
254 <div class="modal-content">
255 <div class="modal-header">
256 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
257 <h3 class="modal-title"><span class="glyphicon glyphicon-lock"></span> Private key</h3>
258 </div>
259 <div class="modal-body">
260 <pre id="priv_key_pre"></pre>
261 </div>
262 </div>
263 </div>
264</div><!-- priv key modal -->