blob: 072504593cf8924425a590063177a985ff6abb73 [file] [log] [blame]
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01001{% extends 'edit.twig' %}
2
3{% block inner_content %}
4{% if result %}
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +01005<div id="mailbox-content" class="responsive-tabs">
6 <ul class="nav nav-tabs" role="tablist">
7 <li role="presentation" class="nav-item"><button class="nav-link active" data-bs-toggle="tab" data-bs-target="#medit">{{ lang.edit.mailbox }}</button></li>
8 <li role="presentation" class="nav-item"><button class="nav-link" data-bs-toggle="tab" data-bs-target="#mpushover">{{ lang.edit.pushover }}</button></li>
9 <li role="presentation" class="nav-item"><button class="nav-link" data-bs-toggle="tab" data-bs-target="#macl">{{ lang.edit.acl }}</button></li>
10 <li role="presentation" class="nav-item"><button class="nav-link" data-bs-toggle="tab" data-bs-target="#mrl">{{ lang.edit.ratelimit }}</button></li>
11 </ul>
12 <hr class="d-none d-md-block">
13 <div class="tab-content">
14 <div id="medit" class="tab-pane fade show active" role="tabpanel" aria-labelledby="mailbox-edit">
15 <div class="card mb-4">
16 <div class="card-header d-flex d-md-none fs-5">
17 <button class="btn flex-grow-1 text-start" data-bs-target="#collapse-tab-medit" data-bs-toggle="collapse" aria-controls="collapse-tab-medit">
18 {{ lang.edit.mailbox }} <span class="badge bg-info table-lines"></span>
19 </button>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010020 </div>
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010021 <div id="collapse-tab-medit" class="card-body collapse show" data-bs-parent="#mailbox-content">
22 <form class="form-horizontal" data-id="editmailbox" role="form" method="post">
23 <input type="hidden" value="default" name="sender_acl">
24 <input type="hidden" value="0" name="force_pw_update">
25 <input type="hidden" value="0" name="sogo_access">
26 <input type="hidden" value="0" name="protocol_access">
27 <div class="row mb-2">
28 <label class="control-label col-sm-2" for="name">{{ lang.edit.full_name }}</label>
29 <div class="col-sm-10">
30 <input type="text" class="form-control" name="name" value="{{ result.name }}">
31 </div>
32 </div>
33 <div class="row mb-4">
34 <label class="control-label col-sm-2">{{ lang.add.tags }}</label>
35 <div class="col-sm-10">
36 <div class="form-control tag-box">
37 {% for tag in mailbox_details.tags %}
38 <span data-action='delete_selected' data-item="{{ tag }}" data-id="mailbox_tag_{{ tag }}" data-api-url='delete/mailbox/tag/{{ mailbox }}' class="badge bg-primary tag-badge btn-badge">
39 <i class="bi bi-tag-fill"></i>
40 {{ tag }}
41 </span>
42 {% endfor %}
43 <input type="text" class="tag-input">
44 <span class="btn tag-add"><i class="bi bi-plus-lg"></i></span>
45 <input type="hidden" value="" name="tags" class="tag-values" />
46 </div>
47 </div>
48 </div>
49 <div class="row mb-2">
50 <label class="control-label col-sm-2" for="quota">{{ lang.edit.quota_mb }}
51 <br><span id="quotaBadge" class="badge bg-info">max. {{ (result.max_new_quota / 1048576) }} MiB</span>
52 </label>
53 <div class="col-sm-10">
54 <input type="number" name="quota" style="width:100%" min="0" max="{{ (result.max_new_quota / 1048576) }}" value="{{ (result.quota / 1048576) }}" class="form-control">
55 <small class="text-muted">0 = ∞</small>
56 </div>
57 </div>
58 <div class="row mb-2">
59 <label class="control-label col-sm-2" for="sender_acl">{{ lang.edit.sender_acl }}</label>
60 <div class="col-sm-10">
61 <select data-live-search="true" data-width="100%" style="width:100%" id="editSelectSenderACL" name="sender_acl" size="10" multiple>
62 {% for domain in sender_acl_handles.sender_acl_domains.ro %}
63 <option data-subtext="Admin" value="{{ domain }}" disabled selected>
64 {{ lang.edit.dont_check_sender_acl|format(domain) }}
65 </option>
66 {% endfor %}
67 {% for alias in sender_acl_handles.sender_acl_addresses.ro %}
68 <option data-subtext="Admin" disabled selected>
69 {{ alias }}
70 </option>
71 {% endfor %}
72 {% for alias in sender_acl_handles.fixed_sender_aliases %}
73 <option data-subtext="Alias" disabled selected>{{ alias }}</option>
74 {% endfor %}
75 {% for domain in sender_acl_handles.sender_acl_domains.rw %}
76 <option value="{{ domain }}" selected>
77 {{ lang.edit.dont_check_sender_acl|format(domain) }}
78 </option>
79 {% endfor %}
80 {% for domain in sender_acl_handles.sender_acl_domains.selectable %}
81 <option value="{{ domain }}">
82 {{ lang.edit.dont_check_sender_acl|format(domain) }}
83 </option>
84 {% endfor %}
85 {% for address in sender_acl_handles.sender_acl_addresses.rw %}
86 <option selected>{{ address }}</option>
87 {% endfor %}
88 {% for address in sender_acl_handles.sender_acl_addresses.selectable %}
89 <option>{{ address }}</option>
90 {% endfor %}
91 </select>
92 <div id="sender_acl_disabled"><i class="bi bi-shield-exclamation"></i> {{ lang.edit.sender_acl_disabled|raw }}</div>
93 <small class="text-muted d-block">{{ lang.edit.sender_acl_info|raw }}</small>
94 </div>
95 </div>
96 <div class="row mb-2">
97 <label class="control-label col-sm-2" for="relayhost">{{ lang.edit.relayhost }}</label>
98 <div class="col-sm-10">
99 <select data-acl="{{ acl.mailbox_relayhost }}" data-live-search="true" id="relayhost" name="relayhost" class="form-control mb-4">
100 {% for rlyhost in rlyhosts %}
101 <option
102 style="{% if rlyhost.active != '1' %}background: #ff4136; color: #fff{% endif %}"
103 {% if result.attributes.relayhost == rlyhost.id %} selected{% endif %}
104 value="{{ rlyhost.id }}">
105 ID {{ rlyhost.id }}: {{ rlyhost.hostname }} ({{ rlyhost.username }})
106 </option>
107 {% endfor %}
108 <option value=""{% if not result.attributes.relayhost %} selected{% endif %}>
109 {{ lang.edit.none_inherit }}
110 </option>
111 </select>
112 <p class="d-block d-sm-none" style="margin: 0;padding: 0">&nbsp;</p>
113 <small class="text-muted d-block">{{ lang.edit.mailbox_relayhost_info }}</small>
114 </div>
115 </div>
116 <div class="row mb-2">
117 <label class="control-label col-sm-2">{{ lang.user.quarantine_notification }}</label>
118 <div class="col-sm-10">
119 <div class="btn-group" data-acl="{{ acl.quarantine_notification }}">
120 <button type="button" class="btn btn-sm btn-xs-quart d-block d-sm-inline{% if quarantine_notification == 'never' %} btn-dark{% else %} btn-light{% endif %}"
121 data-action="edit_selected"
122 data-item="{{ mailbox }}"
123 data-id="quarantine_notification"
124 data-api-url='edit/quarantine_notification'
125 data-api-attr='{"quarantine_notification":"never"}'>{{ lang.user.never }}</button>
126 <button type="button" class="btn btn-sm btn-xs-quart d-block d-sm-inline{% if quarantine_notification == 'hourly' %} btn-dark{% else %} btn-light{% endif %}"
127 data-action="edit_selected"
128 data-item="{{ mailbox }}"
129 data-id="quarantine_notification"
130 data-api-url='edit/quarantine_notification'
131 data-api-attr='{"quarantine_notification":"hourly"}'>{{ lang.user.hourly }}</button>
132 <button type="button" class="btn btn-sm btn-xs-quart d-block d-sm-inline{% if quarantine_notification == 'daily' %} btn-dark{% else %} btn-light{% endif %}"
133 data-action="edit_selected"
134 data-item="{{ mailbox }}"
135 data-id="quarantine_notification"
136 data-api-url='edit/quarantine_notification'
137 data-api-attr='{"quarantine_notification":"daily"}'>{{ lang.user.daily }}</button>
138 <button type="button" class="btn btn-sm btn-xs-quart d-block d-sm-inline{% if quarantine_notification == 'weekly' %} btn-dark{% else %} btn-light{% endif %}"
139 data-action="edit_selected"
140 data-item="{{ mailbox }}"
141 data-id="quarantine_notification"
142 data-api-url='edit/quarantine_notification'
143 data-api-attr='{"quarantine_notification":"weekly"}'>{{ lang.user.weekly }}</button>
144 </div>
145 <p class="text-muted"><small>{{ lang.user.quarantine_notification_info }}</small></p>
146 </div>
147 </div>
148 <div class="row mb-2">
149 <label class="control-label col-sm-2">{{ lang.user.quarantine_category }}</label>
150 <div class="col-sm-10">
151 <div class="btn-group" data-acl="{{ acl.quarantine_category }}">
152 <button type="button" class="btn btn-sm btn-xs-third d-block d-sm-inline{% if quarantine_category == 'reject' %} btn-dark{% else %} btn-light{% endif %}"
153 data-action="edit_selected"
154 data-item="{{ mailbox }}"
155 data-id="quarantine_category"
156 data-api-url='edit/quarantine_category'
157 data-api-attr='{"quarantine_category":"reject"}'>{{ lang.user.q_reject }}</button>
158 <button type="button" class="btn btn-sm btn-xs-third d-block d-sm-inline{% if quarantine_category == 'add_header' %} btn-dark{% else %} btn-light{% endif %}"
159 data-action="edit_selected"
160 data-item="{{ mailbox }}"
161 data-id="quarantine_category"
162 data-api-url='edit/quarantine_category'
163 data-api-attr='{"quarantine_category":"add_header"}'>{{ lang.user.q_add_header }}</button>
164 <button type="button" class="btn btn-sm btn-xs-third d-block d-sm-inline{% if quarantine_category == 'all' %} btn-dark{% else %} btn-light{% endif %}"
165 data-action="edit_selected"
166 data-item="{{ mailbox }}"
167 data-id="quarantine_category"
168 data-api-url='edit/quarantine_category'
169 data-api-attr='{"quarantine_category":"all"}'>{{ lang.user.q_all }}</button>
170 </div>
171 <p class="text-muted"><small>{{ lang.user.quarantine_category_info }}</small></p>
172 </div>
173 </div>
174 <div class="row mb-4">
175 <label class="control-label col-sm-2" for="sender_acl">{{ lang.user.tls_policy }}</label>
176 <div class="col-sm-10">
177 <div class="btn-group" data-acl="{{ acl.tls_policy }}">
178 <button type="button" class="btn btn-sm btn-xs-half d-block d-sm-inline{% if get_tls_policy.tls_enforce_in == '1' %} btn-dark{% else %} btn-light{% endif %}"
179 data-action="edit_selected"
180 data-item="{{ mailbox }}"
181 data-id="tls_policy"
182 data-api-url='edit/tls_policy'
183 data-api-attr='{"tls_enforce_in": {% if get_tls_policy.tls_enforce_in == '1' %}0{% else %}1{% endif %} }'>{{ lang.user.tls_enforce_in }}</button>
184 <button type="button" class="btn btn-sm btn-xs-half d-block d-sm-inline{% if get_tls_policy.tls_enforce_out == '1' %} btn-dark{% else %} btn-light{% endif %}"
185 data-action="edit_selected"
186 data-item="{{ mailbox }}"
187 data-id="tls_policy"
188 data-api-url='edit/tls_policy'
189 data-api-attr='{"tls_enforce_out": {% if get_tls_policy.tls_enforce_out == '1' %}0{% else %}1{% endif %} }'>{{ lang.user.tls_enforce_out }}</button>
190 </div>
191 </div>
192 </div>
193 <div class="row">
194 <label class="control-label col-sm-2" for="password">{{ lang.edit.password }} (<a href="#" class="generate_password">{{ lang.edit.generate }}</a>)</label>
195 <div class="col-sm-10">
196 <input type="password" data-pwgen-field="true" data-hibp="true" class="form-control" name="password" placeholder="{{ lang.edit.unchanged_if_empty }}" autocomplete="new-password">
197 </div>
198 </div>
199 <div class="row mb-4">
200 <label class="control-label col-sm-2" for="password2">{{ lang.edit.password_repeat }}</label>
201 <div class="col-sm-10">
202 <input type="password" data-pwgen-field="true" class="form-control" name="password2" autocomplete="new-password">
203 </div>
204 </div>
205 <div data-acl="{{ acl.extend_sender_acl }}" class="row mb-4">
206 <label class="control-label col-sm-2" for="extended_sender_acl">{{ lang.edit.extended_sender_acl }}</label>
207 <div class="col-sm-10">
208 {% if sender_acl_handles.external_sender_aliases %}
209 {% set ext_sender_acl = sender_acl_handles.external_sender_aliases|join(', ') %}
210 {% endif %}
211 {% if acl.extend_sender_acl and acl.extend_sender_acl == 1 %}
212 <input type="text" class="form-control" name="extended_sender_acl" value="{{ ext_sender_acl }}" placeholder="user1@example.com, user2@example.org, @example.com, ...">
213 <small class="text-muted">{{ lang.edit.extended_sender_acl_info|raw }}</small>
214 {% endif %}
215 </div>
216 </div>
217 <div class="row">
218 <label class="control-label col-sm-2" for="protocol_access">{{ lang.edit.allowed_protocols }}</label>
219 <div class="col-sm-10">
220 <select data-acl="{{ acl.protocol_access }}" name="protocol_access" multiple class="form-control">
221 <option value="imap"{% if result.attributes.imap_access == '1' %} selected{% endif %}>IMAP</option>
222 <option value="pop3"{% if result.attributes.pop3_access == '1' %} selected{% endif %}>POP3</option>
223 <option value="smtp"{% if result.attributes.smtp_access == '1' %} selected{% endif %}>SMTP</option>
224 <option value="sieve"{% if result.attributes.sieve_access == '1' %} selected{% endif %}>Sieve</option>
225 </select>
226 </div>
227 </div>
228 <div hidden data-acl="{{ acl.smtp_ip_access }}" class="row">
229 <label class="control-label col-sm-2" for="allow_from_smtp">{{ lang.edit.allow_from_smtp }}</label>
230 <div class="col-sm-10">
231 <input type="text" class="form-control" name="allow_from_smtp" value="{{ allow_from_smtp }}" placeholder="1.1.1.1, 10.2.0.0/24, ...">
232 <small class="text-muted">{{ lang.edit.allow_from_smtp_info }}</small>
233 </div>
234 </div>
235 <hr>
236 <div class="row">
237 <div class="offset-sm-2 col-sm-10">
238 <select name="active" class="form-control">
239 <option value="1"{% if result.active == '1' %} selected{% endif %}>{{ lang.edit.active }}</option>
240 <option value="2"{% if result.active == '2' %} selected{% endif %}>{{ lang.edit.disable_login }}</option>
241 <option value="0"{% if result.active == '0' %} selected{% endif %}>{{ lang.edit.inactive }}</option>
242 </select>
243 </div>
244 </div>
245 <div class="row mt-2">
246 <div class="offset-sm-2 col-sm-10">
247 <div class="form-check">
248 <label><input type="checkbox" class="form-check-input" value="1" name="force_pw_update"{% if result.attributes.force_pw_update == '1' %} checked{% endif %}> {{ lang.edit.force_pw_update }}</label>
249 <small class="text-muted">{{ lang.edit.force_pw_update_info|format(ui_texts.main_name) }}</small>
250 </div>
251 </div>
252 </div>
253 {% if not skip_sogo %}
254 <div data-acl="{{ acl.sogo_access }}" class="row">
255 <div class="offset-sm-2 col-sm-10">
256 <div class="form-check">
257 <label><input type="checkbox" class="form-check-input" value="1" name="sogo_access"{% if result.attributes.sogo_access == '1' %} checked{% endif %}> {{ lang.edit.sogo_access }}</label>
258 <small class="text-muted">{{ lang.edit.sogo_access_info }}</small>
259 </div>
260 </div>
261 </div>
262 {% endif %}
263 <div class="row mt-2 mb-2">
264 <div class="offset-sm-2 col-sm-10">
265 <button class="btn btn-xs-lg d-block d-sm-inline btn-success" data-action="edit_selected" data-id="editmailbox" data-item="{{ result.username }}" data-api-url='edit/mailbox' data-api-attr='{}' href="#">{{ lang.edit.save }}</button>
266 </div>
267 </div>
268 <div class="row">
269 <div class="offset-sm-2 col-sm-10">
270 <small class="fst-italic d-block">{{ lang.edit.created_on }}: {{ result.created }}</small>
271 <small class="fst-italic d-block">{{ lang.edit.last_modified }}: {{ result.modified }}</small>
272 </div>
273 </div>
274 </form>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +0100275 </div>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100276 </div>
277 </div>
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +0100278 <div id="mpushover" class="tab-pane fade" role="tabpanel" aria-labelledby="mailbox-pushover">
279 <div class="card mb-4">
280 <div class="card-header d-flex d-md-none fs-5">
281 <button class="btn flex-grow-1 text-start" data-bs-target="#collapse-tab-mpushover" data-bs-toggle="collapse" aria-controls="collapse-tab-mpushover">
282 {{ lang.edit.pushover }} <span class="badge bg-info table-lines"></span>
283 </button>
284 </div>
285 <div id="collapse-tab-mpushover" class="card-body collapse" data-bs-parent="#mailbox-content">
286 <form data-id="pushover" class="form well" method="post">
287 <input type="hidden" value="0" name="evaluate_x_prio">
288 <input type="hidden" value="0" name="only_x_prio">
289 <input type="hidden" value="0" name="active">
290 <div class="row">
291 <div class="col-sm-1">
292 <p class="text-muted"><a href="https://pushover.net" target="_blank"><img src="data:image/png;base64,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" class="img img-fluid"></a></p>
293 </div>
294 <div class="col-sm-10">
295 <p class="text-muted">{{ lang.user.pushover_info|format(mailbox)|raw }}</p>
296 <p class="text-muted">{{ lang.edit.pushover_vars|raw }}: <code>{SUBJECT}</code>, <code>{SENDER}</code>, <code>{SENDER_ADDRESS}</code>, <code>{SENDER_NAME}</code>, <code>{TO_NAME}</code>, <code>{TO_ADDRESS}</code>, <code>{MSG_ID}</code></p>
297 <div class="row">
298 <div class="col-sm-6 mb-2">
299 <label for="token">API Token/Key (Application)</label>
300 <input type="text" class="form-control" name="token" maxlength="30" value="{{ pushover_data.token }}" required>
301 </div>
302 <div class="col-sm-6 mb-2">
303 <label for="key">User/Group Key</label>
304 <input type="text" class="form-control" name="key" maxlength="30" value="{{ pushover_data.key }}" required>
305 </div>
306 <div class="col-sm-6 mb-4">
307 <label for="title">{{ lang.edit.pushover_title }}</label>
308 <input type="text" class="form-control" name="title" value="{{ pushover_data.title }}" placeholder="Mail">
309 </div>
310 <div class="col-sm-6 mb-4">
311 <label for="text">{{ lang.edit.pushover_text }}</label>
312 <input type="text" class="form-control" name="text" value="{{ pushover_data.text }}" placeholder="You've got mail 📧">
313 </div>
314 <div class="col-sm-12 mb-4">
315 <label for="text">{{ lang.edit.pushover_sender_array|raw }}</label>
316 <input type="text" class="form-control" name="senders" value="{{ pushover_data.senders }}" placeholder="sender1@example.com, sender2@example.com">
317 </div>
318 <div class="col-sm-12 mb-2">
319 <div class="form-group">
320 <label for="sound">{{ lang.edit.pushover_sound }}</label><br>
321 <select name="sound" class="form-control">
322 <option value="pushover"{% if pushover_data.attributes.sound == 'pushover' %} selected{% endif %}>Pushover (default)</option>
323 <option value="bike"{% if pushover_data.attributes.sound == 'bike' %} selected{% endif %}>Bike</option>
324 <option value="bugle"{% if pushover_data.attributes.sound == 'bugle' %} selected{% endif %}>Bugle</option>
325 <option value="cashregister"{% if pushover_data.attributes.sound == 'cashregister' %} selected{% endif %}>Cash Register</option>
326 <option value="classical"{% if pushover_data.attributes.sound == 'classical' %} selected{% endif %}>Classical</option>
327 <option value="cosmic"{% if pushover_data.attributes.sound == 'cosmic' %} selected{% endif %}>Cosmic</option>
328 <option value="falling"{% if pushover_data.attributes.sound == 'falling' %} selected{% endif %}>Falling</option>
329 <option value="gamelan"{% if pushover_data.attributes.sound == 'gamelan' %} selected{% endif %}>Gamelan</option>
330 <option value="incoming"{% if pushover_data.attributes.sound == 'incoming' %} selected{% endif %}>Incoming</option>
331 <option value="intermission"{% if pushover_data.attributes.sound == 'intermission' %} selected{% endif %}>Intermission</option>
332 <option value="magic"{% if pushover_data.attributes.sound == 'magic' %} selected{% endif %}>Magic</option>
333 <option value="mechanical"{% if pushover_data.attributes.sound == 'mechanical' %} selected{% endif %}>Mechanical</option>
334 <option value="pianobar"{% if pushover_data.attributes.sound == 'pianobar' %} selected{% endif %}>Piano Bar</option>
335 <option value="siren"{% if pushover_data.attributes.sound == 'siren' %} selected{% endif %}>Siren</option>
336 <option value="spacealarm"{% if pushover_data.attributes.sound == 'spacealarm' %} selected{% endif %}>Space Alarm</option>
337 <option value="tugboat"{% if pushover_data.attributes.sound == 'tugboat' %} selected{% endif %}>Tug Boat</option>
338 <option value="alien"{% if pushover_data.attributes.sound == 'alien' %} selected{% endif %}>Alien Alarm (long)</option>
339 <option value="climb"{% if pushover_data.attributes.sound == 'climb' %} selected{% endif %}>Climb (long)</option>
340 <option value="persistent"{% if pushover_data.attributes.sound == 'persistent' %} selected{% endif %}>Persistent (long)</option>
341 <option value="echo"{% if pushover_data.attributes.sound == 'echo' %} selected{% endif %}>Pushover Echo (long)</option>
342 <option value="updown"{% if pushover_data.attributes.sound == 'updown' %} selected{% endif %}>Up Down (long)</option>
343 <option value="vibrate"{% if pushover_data.attributes.sound == 'vibrate' %} selected{% endif %}>Vibrate Only</option>
344 <option value="none"{% if pushover_data.attributes.sound == 'none' %} selected{% endif %}> None (silent) </option>
345 </select>
346 </div>
347 </div>
348 <div class="col-sm-12">
349 <div class="form-check">
350 <label><input type="checkbox" class="form-check-input" value="1" name="active"{% if pushover_data.active == '1' %} checked{% endif %}> {{ lang.edit.active }}</label>
351 </div>
352 </div>
353 <div class="col-sm-12">
354 <legend style="cursor:pointer;margin-top:10px" data-bs-target="#po_advanced" unselectable="on" data-bs-toggle="collapse">
355 <i class="bi bi-plus"></i> {{ lang.edit.advanced_settings }}
356 </legend>
357 <hr />
358 </div>
359 <div class="col-sm-12 mb-4">
360 <div id="po_advanced" class="collapse">
361 <label for="text">{{ lang.edit.pushover_sender_regex }}</label>
362 <input type="text" class="form-control mt-2" name="senders_regex" value="{{ pushover_data.senders_regex }}" placeholder="/(.*@example\.org$|^foo@example\.com$)/i" regex="true">
363 <div class="form-check mt-4">
364 <label><input type="checkbox" class="form-check-input" value="1" name="evaluate_x_prio"{% if pushover_data.attributes.evaluate_x_prio == '1' %} checked{% endif %}> {{ lang.edit.pushover_evaluate_x_prio|raw }}</label>
365 </div>
366 <div class="form-check mt-2">
367 <label><input type="checkbox" class="form-check-input" value="1" name="only_x_prio"{% if pushover_data.attributes.only_x_prio == '1' %} checked{% endif %}> {{ lang.edit.pushover_only_x_prio|raw }}</label>
368 </div>
369 </div>
370 </div>
371 </div>
372 <div class="btn-group" data-acl="{{ acl.pushover }}">
373 <a class="btn btn-sm btn-xs-half d-block d-sm-inline btn-success" data-action="edit_selected" data-id="pushover" data-item="{{ mailbox }}" data-api-url='edit/pushover' data-api-attr='{}' href="#">{{ lang.edit.save }}</a>
374 <a class="btn btn-sm btn-xs-half d-block d-sm-inline btn-secondary" data-action="edit_selected" data-id="pushover-test" data-item="{{ mailbox }}" data-api-url='edit/pushover-test' data-api-attr='{}' href="#"><i class="bi bi-check-lg"></i> {{ lang.edit.pushover_verify }}</a>
375 <a id="pushover_delete" class="btn btn-sm d-block d-sm-inline btn-danger" data-action="edit_selected" data-id="pushover-delete" data-item="{{ mailbox }}" data-api-url='edit/pushover' data-api-attr='{"delete":"true"}' href="#"><i class="bi bi-trash"></i> {{ lang.edit.remove }}</a>
376 </div>
377 </div>
378 </div>
379 </form>
380 </div>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100381 </div>
382 </div>
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +0100383 <div id="macl" class="tab-pane fade" role="tabpanel" aria-labelledby="mailbox-acl">
384 <div class="card mb-4">
385 <div class="card-header d-flex d-md-none fs-5">
386 <button class="btn flex-grow-1 text-start" data-bs-target="#collapse-tab-macl" data-bs-toggle="collapse" aria-controls="collapse-tab-macl">
387 {{ lang.edit.acl }} <span class="badge bg-info table-lines"></span>
388 </button>
389 </div>
390 <div id="collapse-tab-macl" class="card-body collapse" data-bs-parent="#mailbox-content">
391 <form data-id="useracl" class="form-inline well" method="post">
392 <div class="row">
393 <div class="col-sm-1">
394 <p class="text-muted">ACL</p>
395 </div>
396 <div class="col-sm-10">
397 <select id="user_acl" name="user_acl" size="10" multiple>
398 {% for acl, val in user_acls %}
399 <option value="{{ acl }}"{% if val == 1 %} selected{% endif %}>{{ lang.acl[acl] }}</option>
400 {% endfor %}
401 </select>
402 <button class="btn btn-xs-lg d-block d-sm-inline btn-secondary" data-action="edit_selected" data-id="useracl" data-item="{{ mailbox }}" data-api-url='edit/user-acl' data-api-attr='{}' href="#">{{ lang.edit.save }}</button>
403 </div>
404 </div>
405 </form>
406 </div>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100407 </div>
408 </div>
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +0100409 <div id="mrl" class="tab-pane fade" role="tabpanel" aria-labelledby="mailbox-rl">
410 <div class="card mb-4">
411 <div class="card-header d-flex d-md-none fs-5">
412 <button class="btn flex-grow-1 text-start" data-bs-target="#collapse-tab-mrl" data-bs-toggle="collapse" aria-controls="collapse-tab-mrl">
413 {{ lang.edit.ratelimit }} <span class="badge bg-info table-lines"></span>
414 </button>
415 </div>
416 <div id="collapse-tab-mrl" class="card-body collapse" data-bs-parent="#mailbox-content">
417 <form data-id="mboxratelimit" class="well" method="post">
418 <div class="row mb-2">
419 <div class="col-sm-2">
420 <p class="text-muted">{{ lang.acl.ratelimit }}</p>
421 </div>
422 <div class="col-sm-10">
423 <div class="input-group">
424 <input name="rl_value" type="number" autocomplete="off" value="{{ rl.value }}" class="form-control" placeholder="{{ lang.ratelimit.disabled }}">
425 <select name="rl_frame" class="form-control">
426 {% include 'mailbox/rl-frame.twig' %}
427 </select>
428 </div>
429 </div>
430 </div>
431 <div class="row mb-2">
432 <div class="offset-sm-2 col-sm-10">
433 <button class="btn btn-xs-lg d-block d-sm-inline btn-secondary" data-action="edit_selected" data-id="mboxratelimit" data-item="{{ mailbox }}" data-api-url='edit/rl-mbox' data-api-attr='{}' href="#">{{ lang.edit.save }}</button>
434 <p class="text-muted mt-2">{{ lang.edit.mbox_rl_info }}</p>
435 </div>
436 </div>
437 </form>
438 </div>
439 </div>
440 </div>
441 </div>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100442</div>
443{% else %}
444 {{ parent() }}
445{% endif %}
446{% endblock %}