public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Trace
data/web/templates/edit/mailbox-templates.twig
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
Author
Date
Commit
Line
Code
1
{% extends 'edit.twig' %}
3
{% block inner_content %}
4
{% if result %}
5
<hr>
6
<div id="medit" class="tab-pane fade show active" role="tabpanel" aria-labelledby="mailbox-edit">
7
<form class="form-horizontal" data-id="editmailbox_template" role="form" method="post">
9
<input type="hidden" value="default" name="sender_acl">
10
<input type="hidden" value="0" name="force_pw_update">
11
<input type="hidden" value="0" name="force_tfa">
12
<input type="hidden" value="0" name="sogo_access">
13
<input type="hidden" value="0" name="protocol_access">
15
<div class="row mb-4">
16
<label class="control-label col-sm-2" for="template">{{ lang.mailbox.template }}</label>
17
<div class="col-sm-10">
18
<div class="input-group mb-3">
19
<input type="text" name="template" class="form-control" aria-label="Text input with dropdown button" value="{{ template.template }}" />
20
</div>
21
</div>
22
</div>
23
<div class="row mb-2">
24
<label class="control-label col-sm-2">{{ lang.add.tags }}</label>
25
<div class="col-sm-10">
26
<div class="form-control tag-box">
27
<input id="tags" type="text" class="tag-input">
28
<span class="btn tag-add"><i class="bi bi-plus-lg"></i></span>
29
<input type="hidden" value='{{ template.attributes.tags|json_encode }}' name="tags" class="tag-values" />
30
</div>
31
</div>
32
</div>
33
<div class="row mb-2">
34
<label class="control-label col-sm-2" for="quota">{{ lang.edit.quota_mb }}</label>
35
<div class="col-sm-10">
36
<input type="number" name="quota" class="w-100 form-control" min="0" value="{{ template.attributes.quota / 1048576 }}">
37
<small class="text-muted">0 = ∞</small>
38
</div>
39
</div>
40
<div class="row mb-2">
41
<label class="control-label col-sm-2">{{ lang.user.tag_handling }}</label>
42
<div class="col-sm-10">
43
<div class="btn-group">
44
<input type="radio" class="btn-check" name="tagged_mail_handler" id="tagged_mail_handler_subfolder" autocomplete="off" value="subfolder" {% if template.attributes.tagged_mail_handler == 'subfolder' %}checked{% endif %}>
45
<label class="btn btn-sm btn-xs-quart d-block d-sm-inline btn-light" for="tagged_mail_handler_subfolder">{{ lang.user.tag_in_subfolder }}</label>
47
<input type="radio" class="btn-check" name="tagged_mail_handler" id="tagged_mail_handler_subject" autocomplete="off" value="subject" {% if template.attributes.tagged_mail_handler == 'subject' %}checked{% endif %}>
48
<label class="btn btn-sm btn-xs-quart d-block d-sm-inline btn-light" for="tagged_mail_handler_subject">{{ lang.user.tag_in_subject }}</label>
50
<input type="radio" class="btn-check" name="tagged_mail_handler" id="tagged_mail_handler_none" autocomplete="off" value="none" {% if template.attributes.tagged_mail_handler == 'none' %}checked{% endif %}>
51
<label class="btn btn-sm btn-xs-quart d-block d-sm-inline btn-light" for="tagged_mail_handler_none">{{ lang.user.tag_in_none }}</label>
52
</div>
53
<p class="text-muted"><small>{{ lang.user.tag_help_explain|raw }}</small></p>
54
<p class="text-muted"><small>{{ lang.user.tag_help_example|raw }}</small></p>
55
</div>
56
</div>
57
<div class="row mb-2">
58
<label class="control-label col-sm-2">{{ lang.user.quarantine_notification }}</label>
59
<div class="col-sm-10">
60
<div class="btn-group">
61
<input type="radio" class="btn-check" name="quarantine_notification" id="quarantine_notification_never" autocomplete="off" value="never" {% if template.attributes.quarantine_notification == 'never' %}checked{% endif %}>
62
<label class="btn btn-sm btn-xs-quart d-block d-sm-inline btn-light" for="quarantine_notification_never">{{ lang.user.never }}</label>
64
<input type="radio" class="btn-check" name="quarantine_notification" id="quarantine_notification_hourly" autocomplete="off" value="hourly" {% if template.attributes.quarantine_notification == 'hourly' %}checked{% endif %}>
65
<label class="btn btn-sm btn-xs-quart d-block d-sm-inline btn-light" for="quarantine_notification_hourly">{{ lang.user.hourly }}</label>
67
<input type="radio" class="btn-check" name="quarantine_notification" id="quarantine_notification_daily" autocomplete="off" value="daily" {% if template.attributes.quarantine_notification == 'daily' %}checked{% endif %}>
68
<label class="btn btn-sm btn-xs-quart d-block d-sm-inline btn-light" for="quarantine_notification_daily">{{ lang.user.daily }}</label>
70
<input type="radio" class="btn-check" name="quarantine_notification" id="quarantine_notification_weekly" autocomplete="off" value="weekly" {% if template.attributes.quarantine_notification == 'weekly' %}checked{% endif %}>
71
<label class="btn btn-sm btn-xs-quart d-block d-sm-inline btn-light" for="quarantine_notification_weekly">{{ lang.user.weekly }}</label>
72
</div>
73
<p class="text-muted"><small>{{ lang.user.quarantine_notification_info }}</small></p>
74
</div>
75
</div>
76
<div class="row mb-2">
77
<label class="control-label col-sm-2">{{ lang.user.quarantine_category }}</label>
78
<div class="col-sm-10">
79
<div class="btn-group">
80
<input type="radio" class="btn-check" name="quarantine_category" id="quarantine_category_reject" autocomplete="off" value="reject" {% if template.attributes.quarantine_category == 'reject' %}checked{% endif %}>
81
<label class="btn btn-sm btn-xs-quart d-block d-sm-inline btn-light" for="quarantine_category_reject">{{ lang.user.q_reject }}</label>
83
<input type="radio" class="btn-check" name="quarantine_category" id="quarantine_category_add_header" autocomplete="off" value="add_header" {% if template.attributes.quarantine_category == 'add_header' %}checked{% endif %}>
84
<label class="btn btn-sm btn-xs-quart d-block d-sm-inline btn-light" for="quarantine_category_add_header">{{ lang.user.q_add_header }}</label>
86
<input type="radio" class="btn-check" name="quarantine_category" id="quarantine_category_all" autocomplete="off" value="all" {% if template.attributes.quarantine_category == 'all' %}checked{% endif %}>
87
<label class="btn btn-sm btn-xs-quart d-block d-sm-inline btn-light" for="quarantine_category_all">{{ lang.user.q_all }}</label>
88
</div>
89
<p class="text-muted"><small>{{ lang.user.quarantine_category_info }}</small></p>
90
</div>
91
</div>
92
<div class="row mb-4">
93
<label class="control-label col-sm-2" for="sender_acl">{{ lang.user.tls_policy }}</label>
94
<div class="col-sm-10">
95
<div class="btn-group">
96
<input type="checkbox" class="btn-check" name="tls_enforce_in" id="tls_enforce_in" autocomplete="off" value="1" {% if template.attributes.tls_enforce_in == '1' %}checked{% endif %}>
97
<label class="btn btn-sm btn-xs-quart d-block d-sm-inline btn-light" for="tls_enforce_in">{{ lang.user.tls_enforce_in }}</label>
99
<input type="checkbox" class="btn-check" name="tls_enforce_out" id="tls_enforce_out" autocomplete="off" value="1" {% if template.attributes.tls_enforce_out == '1' %}checked{% endif %}>
100
<label class="btn btn-sm btn-xs-quart d-block d-sm-inline btn-light" for="tls_enforce_out">{{ lang.user.tls_enforce_out }}</label>
101
</div>
102
</div>
103
</div>
104
<div class="row mb-2">
105
<label class="control-label col-sm-2" for="protocol_access">{{ lang.edit.allowed_protocols }}</label>
106
<div class="col-sm-10">
107
<select name="protocol_access" multiple class="form-control">
108
<option value="imap"{% if template.attributes.imap_access == '1' %} selected{% endif %}>IMAP</option>
109
<option value="pop3"{% if template.attributes.pop3_access == '1' %} selected{% endif %}>POP3</option>
110
<option value="smtp"{% if template.attributes.smtp_access == '1' %} selected{% endif %}>SMTP</option>
111
<option value="sieve"{% if template.attributes.sieve_access == '1' %} selected{% endif %}>Sieve</option>
112
<option value="eas"{% if template.attributes.eas_access == '1' %} selected{% endif %}>ActiveSync</option>
113
<option value="dav"{% if template.attributes.dav_access == '1' %} selected{% endif %}>CalDAV/CardDAV</option>
114
</select>
115
</div>
116
</div>
117
<div class="row mb-4">
118
<label class="control-label col-sm-2">ACL</label>
119
<div class="col-sm-10">
120
<select id="template_user_acl" name="acl" size="10" multiple class="form-control">
121
<option value="spam_alias" {% if template.attributes.acl_spam_alias == '1' %} selected{% endif %}>{{ lang.acl["spam_alias"] }}</option>
122
<option value="tls_policy" {% if template.attributes.acl_tls_policy == '1' %} selected{% endif %}>{{ lang.acl["tls_policy"] }}</option>
123
<option value="spam_score" {% if template.attributes.acl_spam_score == '1' %} selected{% endif %}>{{ lang.acl["spam_score"] }}</option>
124
<option value="spam_policy" {% if template.attributes.acl_spam_policy == '1' %} selected{% endif %}>{{ lang.acl["spam_policy"] }}</option>
125
<option value="delimiter_action" {% if template.attributes.acl_delimiter_action == '1' %} selected{% endif %}>{{ lang.acl["delimiter_action"] }}</option>
126
<option value="syncjobs" {% if template.attributes.acl_syncjobs == '1' %} selected{% endif %}>{{ lang.acl["syncjobs"] }}</option>
127
<option value="eas_reset" {% if template.attributes.acl_eas_reset == '1' %} selected{% endif %}>{{ lang.acl["eas_reset"] }}</option>
128
<option value="sogo_profile_reset" {% if template.attributes.acl_sogo_profile_reset == '1' %} selected{% endif %}>{{ lang.acl["sogo_profile_reset"] }}</option>
129
<option value="pushover" {% if template.attributes.acl_pushover == '1' %} selected{% endif %}>{{ lang.acl["pushover"] }}</option>
130
<option value="quarantine" {% if template.attributes.acl_quarantine == '1' %} selected{% endif %}>{{ lang.acl["quarantine"] }}</option>
131
<option value="quarantine_attachments" {% if template.attributes.acl_quarantine_attachments == '1' %} selected{% endif %}>{{ lang.acl["quarantine_attachments"] }}</option>
132
<option value="quarantine_notification" {% if template.attributes.acl_quarantine_notification == '1' %} selected{% endif %}>{{ lang.acl["quarantine_notification"] }}</option>
133
<option value="quarantine_category" {% if template.attributes.acl_quarantine_category == '1' %} selected{% endif %}>{{ lang.acl["quarantine_category"] }}</option>
134
<option value="app_passwds" {% if template.attributes.acl_app_passwds == '1' %} selected{% endif %}>{{ lang.acl["app_passwds"] }}</option>
135
<option value="pw_reset" {% if template.attributes.acl_pw_reset == '1' %} selected{% endif %}>{{ lang.acl["pw_reset"] }}</option>
136
</select>
137
</div>
138
</div>
139
<div class="row mb-4">
140
<label class="control-label col-sm-2">{{ lang.acl.ratelimit }}</label>
141
<div class="col-sm-10">
142
<div class="input-group">
143
<input name="rl_value" type="number" autocomplete="off" value="{{ template.attributes.rl_value }}" class="form-control mb-2" placeholder="{{ lang.ratelimit.disabled }}">
144
<select name="rl_frame" class="form-control">
145
{% include 'mailbox/rl-frame.twig' %}
146
</select>
147
</div>
148
<p class="text-muted mt-1">{{ lang.edit.mbox_rl_info }}</p>
149
</div>
150
</div>
151
<hr>
152
<div class="row my-2">
153
<div class="offset-sm-2 col-sm-10">
154
<select name="active" class="form-control">
155
<option value="1"{% if template.attributes.active == '1' %} selected{% endif %}>{{ lang.edit.active }}</option>
156
<option value="2"{% if template.attributes.active == '2' %} selected{% endif %}>{{ lang.edit.disable_login }}</option>
157
<option value="0"{% if template.attributes.active == '0' %} selected{% endif %}>{{ lang.edit.inactive }}</option>
158
</select>
159
</div>
160
</div>
161
<div class="row">
162
<div class="offset-sm-2 col-sm-10">
163
<div class="form-check">
164
<label><input type="checkbox" class="form-check-input" value="1" name="force_pw_update"{% if template.attributes.force_pw_update == '1' %} checked{% endif %}> {{ lang.edit.force_pw_update }}</label>
165
<small class="text-muted">{{ lang.edit.force_pw_update_info|format(ui_texts.main_name) }}</small>
166
</div>
167
</div>
168
</div>
169
<div class="row">
170
<div class="offset-sm-2 col-sm-10">
171
<div class="form-check">
172
<label><input type="checkbox" class="form-check-input" value="1" name="force_tfa" id="force_tfa"{% if template.attributes.force_tfa == '1' %} checked{% endif %}> {{ lang.tfa.force_tfa }}</label>
173
<small class="text-muted">{{ lang.tfa.force_tfa_info }}</small>
174
</div>
175
</div>
176
</div>
177
{% if not skip_sogo %}
178
<div class="row">
179
<div class="offset-sm-2 col-sm-10">
180
<div class="form-check">
181
<label><input type="checkbox" class="form-check-input" value="1" name="sogo_access"{% if template.attributes.sogo_access == '1' %} checked{% endif %}> {{ lang.edit.sogo_access }}</label>
182
<small class="text-muted">{{ lang.edit.sogo_access_info }}</small>
183
</div>
184
</div>
185
</div>
186
{% endif %}
187
<div class="row my-2">
188
<div class="offset-sm-2 col-sm-10">
189
<button class="btn btn-xs-lg d-block d-sm-inline btn-success" data-action="edit_selected" data-id="editmailbox_template" data-item="{{ template.id }}" data-api-url='edit/mailbox/template' data-api-attr='{}' href="#">{{ lang.edit.save }}</button>
190
</div>
191
</div>
192
</form>
193
</div>
194
{% else %}
195
{{ parent() }}
196
{% endif %}
197
{% endblock %}