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 | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 5 | <h4 class="mb-4">{{ lang.edit.edit_alias_domain }}</h4> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 6 | <form class="form-horizontal" data-id="editaliasdomain" role="form" method="post"> |
| 7 | <input type="hidden" value="0" name="active"> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 8 | <div class="row mb-2"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 9 | <label class="control-label col-sm-2" for="target_domain">{{ lang.edit.target_domain }}</label> |
| 10 | <div class="col-sm-10"> |
| 11 | <select class="full-width-select" data-live-search="true" id="addSelectDomain" name="target_domain" required> |
| 12 | {% for domain in domains %} |
| 13 | <option{% if result.target_domain == domain %} selected{% endif %}>{{ domain }}</option> |
| 14 | {% endfor %} |
| 15 | </select> |
| 16 | </div> |
| 17 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 18 | <div class="row mb-2"> |
| 19 | <div class="offset-sm-2 col-sm-10"> |
Matthias Andreas Benkard | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 20 | <div class="form-check"> |
| 21 | <label><input type="checkbox" class="form-check-input" value="1" name="active"{% if result.active == '1' %} checked{% endif %}> {{ lang.edit.active }}</label> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 22 | </div> |
| 23 | </div> |
| 24 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 25 | <div class="row mb-4"> |
| 26 | <div class="offset-sm-2 col-sm-10"> |
| 27 | <button class="btn btn-xs-lg d-block d-sm-inline btn-success" data-action="edit_selected" data-id="editaliasdomain" data-item="{{ alias_domain }}" data-api-url='edit/alias-domain' data-api-attr='{}' href="#">{{ lang.edit.save }}</button> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 28 | </div> |
| 29 | </div> |
| 30 | </form> |
| 31 | <hr> |
| 32 | <form data-id="domratelimit" class="form-inline well" method="post"> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 33 | <label class="control-label mb-2">{{ lang.acl.ratelimit }}</label> |
Matthias Andreas Benkard | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 34 | <div class="input-group mb-4"> |
| 35 | <input name="rl_value" type="number" value="{{ rl.value }}" autocomplete="off" class="form-control" placeholder="{{ lang.ratelimit.disabled }}"> |
| 36 | <select name="rl_frame" class="form-control"> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 37 | {% include 'mailbox/rl-frame.twig' %} |
Matthias Andreas Benkard | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 38 | </select> |
| 39 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 40 | <button class="btn btn-xs-lg d-block d-sm-inline btn-secondary" data-action="edit_selected" data-id="domratelimit" data-item="{{ alias_domain }}" data-api-url='edit/rl-domain' data-api-attr='{}' href="#">{{ lang.admin.save }}</button> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 41 | </form> |
| 42 | {% if dkim %} |
| 43 | <hr> |
| 44 | <div class="row"> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 45 | <div class="col-12 col-sm-2"> |
Matthias Andreas Benkard | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 46 | <p>{{ lang.add.domain }}: <strong>{{ result.alias_domain }}</strong> ({{ dkim.dkim_selector }}._domainkey)</p> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 47 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 48 | <div class="col-12 col-sm-10"> |
| 49 | <pre class="p-2">{{ dkim.dkim_txt }}</pre> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 50 | </div> |
| 51 | </div> |
| 52 | {% endif %} |
| 53 | {% else %} |
| 54 | {{ parent() }} |
| 55 | {% endif %} |
| 56 | {% endblock %} |