blob: 91d9d53969b69f5840b3318441d6b77fcbdd4e58 [file] [log] [blame]
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +01001<div role="tabpanel" class="tab-pane fade" id="tab-config-quarantine" role="tabpanel" aria-labelledby="tab-config-quarantine">
2 <div class="card mb-4">
3 <div class="card-header d-flex fs-5">
4 <button class="btn d-md-none flex-grow-1 text-start" data-bs-target="#collapse-tab-config-quarantine" data-bs-toggle="collapse" aria-controls="ollapse-tab-config-quarantine">
5 {{ lang.admin.quarantine }}
6 </button>
7 <span class="d-none d-md-block">{{ lang.admin.quarantine }}</span>
8 </div>
9 <div id="collapse-tab-config-quarantine" class="card-body collapse" data-bs-parent="#admin-content">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010010 {% if not q_data.retention_size or not q_data.max_size %}
11 <div class="alert alert-info">{{ lang.quarantine.disabled_by_config }}</div>
12 {% endif %}
13 <form class="form-horizontal" data-id="quarantine" role="form" method="post">
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010014 <div class="row mb-4">
15 <label class="col-sm-4 control-label text-sm-end" for="quarantine_retention_size">{{ lang.admin.quarantine_retention_size|raw }}</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010016 <div class="col-sm-8">
17 <input type="number" class="form-control" id="quarantine_retention_size" name="retention_size" value="{{ q_data.retention_size }}" placeholder="0" required>
18 </div>
19 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010020 <div class="row mb-4">
21 <label class="col-sm-4 control-label text-sm-end" for="quarantine_max_size">{{ lang.admin.quarantine_max_size|raw }}</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010022 <div class="col-sm-8">
23 <input type="number" class="form-control" id="quarantine_max_size" name="max_size" value="{{ q_data.max_size }}" placeholder="0" required>
24 </div>
25 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010026 <div class="row mb-4">
27 <label class="col-sm-4 control-label text-sm-end" for="quarantine_max_score">{{ lang.admin.quarantine_max_score|raw }}</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010028 <div class="col-sm-8">
29 <input type="number" class="form-control" id="quarantine_max_score" name="max_score" value="{{ q_data.max_score }}" placeholder="9999.0">
30 </div>
31 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010032 <div class="row mb-4">
33 <label class="col-sm-4 control-label text-sm-end" for="quarantine_max_age">{{ lang.admin.quarantine_max_age|raw }}</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010034 <div class="col-sm-8">
35 <input type="number" class="form-control" id="quarantine_max_age" name="max_age" value="{{ q_data.max_age }}" min="1" required>
36 </div>
37 </div>
38 <hr>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010039 <div class="row mb-4">
40 <label class="col-sm-4 control-label text-sm-end" for="quarantine_redirect"><i class="bi bi-box-arrow-right"></i> {{ lang.admin.quarantine_redirect|raw }}</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010041 <div class="col-sm-8">
42 <input type="email" class="form-control" id="quarantine_redirect" name="redirect" value="{{ q_data.redirect }}" placeholder="">
43 </div>
44 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010045 <div class="row mb-4">
46 <label class="col-sm-4 control-label text-sm-end" for="quarantine_bcc"><i class="bi bi-files"></i> {{ lang.admin.quarantine_bcc|raw }}</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010047 <div class="col-sm-8">
48 <input type="email" class="form-control" id="quarantine_bcc" name="bcc" value="{{ q_data.bcc }}" placeholder="">
49 </div>
50 </div>
51 <hr>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010052 <div class="row mb-2">
53 <label class="col-sm-4 control-label text-sm-end" for="quarantine_sender">{{ lang.admin.quarantine_notification_sender }}:</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010054 <div class="col-sm-8">
55 <input type="email" class="form-control" id="quarantine_sender" name="sender" value="{{ q_data.sender }}" placeholder="quarantine@localhost">
56 </div>
57 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010058 <div class="row mb-4">
59 <label class="col-sm-4 control-label text-sm-end" for="quarantine_subject">{{ lang.admin.quarantine_notification_subject }}:</label>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010060 <div class="col-sm-8">
61 <input type="text" class="form-control" id="quarantine_subject" name="subject" value="{{ q_data.subject }}" placeholder="Spam Quarantine Notification">
62 </div>
63 </div>
64 <hr>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010065 <div class="row mb-2">
66 <label class="col-sm-4 control-label text-sm-end" for="quarantine_release_format">{{ lang.admin.quarantine_release_format }}:</label>
67 <div class="col-sm-8 col-md-6 col-lg-4 col-xl-3">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010068 <select data-width="100%" id="quarantine_release_format" name="release_format" class="selectpicker" title="{{ lang.tfa.select }}">
69 <option {% if q_data.release_format == 'raw' %}selected{% endif %} value="raw">{{ lang.admin.quarantine_release_format_raw }}</option>
70 <option {% if q_data.release_format == 'attachment' %}selected{% endif %} value="attachment">{{ lang.admin.quarantine_release_format_att }}</option>
71 </select>
72 </div>
73 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010074 <div class="row mb-4">
75 <label class="col-sm-4 control-label text-sm-end" for="exclude_domains">{{ lang.admin.quarantine_exclude_domains }}:</label>
76 <div class="col-sm-8 col-md-6 col-lg-4 col-xl-3">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010077 <select data-width="100%" name="exclude_domains" class="selectpicker" title="{{ lang.tfa.select }}" multiple>
78 {% for domain in all_domains %}
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010079 <option {% if domain in q_data.exclude_domains %}selected{% endif %}>{{ domain }}</option>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010080 {% endfor %}
81 </select>
82 </div>
83 </div>
84 <hr>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010085 <legend data-bs-target="#quarantine_template" style="cursor:pointer" unselectable="on" data-bs-toggle="collapse">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010086 <i style="font-size:10pt;" class="bi bi-plus-square"></i> {{ lang.admin.quarantine_notification_html|raw }}
87 </legend>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010088 <hr />
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010089 <div id="quarantine_template" class="collapse" >
90 <textarea autocorrect="off" spellcheck="false" autocapitalize="none" class="form-control textarea-code" rows="40" name="html_tmpl">{{ q_data.html_tmpl|raw }}</textarea>
91 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010092 <button class="btn btn-sm d-block d-sm-inline btn-success" data-action="edit_selected" data-item="self" data-id="quarantine" data-api-url='edit/quarantine' data-api-attr='{"action":"settings"}' href="#"><i class="bi bi-check-lg"></i> {{ lang.admin.save }}</button>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010093 </form>
94 </div>
95 </div>
96</div>