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