blob: 540326e8d7f0844c778f023dc1d88d17c0c6b212 [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<h4 class="mb-4">{{ lang.edit.edit_alias_domain }}</h4>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01006<form class="form-horizontal" data-id="editaliasdomain" role="form" method="post">
7 <input type="hidden" value="0" name="active">
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +01008 <div class="row mb-2">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01009 <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 Benkard1ba53812022-12-27 17:32:58 +010018 <div class="row mb-2">
19 <div class="offset-sm-2 col-sm-10">
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010020 <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 Benkard12a57352021-12-28 18:02:04 +010022 </div>
23 </div>
24 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010025 <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 Benkard12a57352021-12-28 18:02:04 +010028 </div>
29 </div>
30</form>
31<hr>
32<form data-id="domratelimit" class="form-inline well" method="post">
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010033 <label class="control-label mb-2">{{ lang.acl.ratelimit }}</label>
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010034 <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 Benkard1ba53812022-12-27 17:32:58 +010037 {% include 'mailbox/rl-frame.twig' %}
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010038 </select>
39 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010040 <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 Benkard12a57352021-12-28 18:02:04 +010041</form>
42{% if dkim %}
43<hr>
44<div class="row">
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010045 <div class="col-12 col-sm-2">
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010046 <p>{{ lang.add.domain }}: <strong>{{ result.alias_domain }}</strong> ({{ dkim.dkim_selector }}._domainkey)</p>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010047 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010048 <div class="col-12 col-sm-10">
49 <pre class="p-2">{{ dkim.dkim_txt }}</pre>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010050 </div>
51</div>
52{% endif %}
53{% else %}
54 {{ parent() }}
55{% endif %}
56{% endblock %}