blob: 6dfe3af562d50210728bc176531e3671762c7b97 [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001<?php
2require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
3
4if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "admin" || $_SESSION['mailcow_cc_role'] == "domainadmin")) {
5require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
6$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
7?>
8<div class="container">
9
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +020010 <ul class="nav nav-tabs responsive-tabs" role="tablist">
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010011 <li role="presentation" class="active"><a href="#tab-domains" aria-controls="tab-domains" role="tab" data-toggle="tab"><?=$lang['mailbox']['domains'];?></a></li>
12 <li role="presentation"><a href="#tab-mailboxes" aria-controls="tab-mailboxes" role="tab" data-toggle="tab"><?=$lang['mailbox']['mailboxes'];?></a></li>
13 <?php /* <li class="dropdown">
14 <a class="dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['mailboxes'];?>
15 <span class="caret"></span></a>
16 <ul class="dropdown-menu">
17 <li role="presentation"><a href="#tab-mailboxes" aria-controls="tab-mailboxes" role="tab" data-toggle="tab"><?=$lang['mailbox']['mailboxes'];?></a></li>
18 <li role="presentation"><a href="#tab-mailbox-defaults" aria-controls="tab-mailbox-defaults" role="tab" data-toggle="tab"><?=$lang['mailbox']['mailbox_defaults'];?></a></li>
19 </ul>
20 </li> */ ?>
21 <li role="presentation"><a href="#tab-resources" aria-controls="tab-resources" role="tab" data-toggle="tab"><?=$lang['mailbox']['resources'];?></a></li>
22 <li class="dropdown">
23 <a class="dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['aliases'];?>
24 <span class="caret"></span></a>
25 <ul class="dropdown-menu">
26 <li role="presentation"><a href="#tab-mbox-aliases" aria-controls="tab-mbox-aliases" role="tab" data-toggle="tab"><?=$lang['mailbox']['aliases'];?></a></li>
27 <li role="presentation"><a href="#tab-domain-aliases" aria-controls="tab-domain-aliases" role="tab" data-toggle="tab"><?=$lang['mailbox']['domain_aliases'];?></a></li>
28 </ul>
29 </li>
30 <li role="presentation"><a href="#tab-syncjobs" aria-controls="tab-syncjobs" role="tab" data-toggle="tab"><?=$lang['mailbox']['sync_jobs'];?></a></li>
31 <li role="presentation"><a href="#tab-filters" aria-controls="tab-filters" role="tab" data-toggle="tab"><?=$lang['mailbox']['filters'];?></a></li>
32 <li role="presentation"><a href="#tab-bcc" aria-controls="tab-filters" role="tab" data-toggle="tab"><?=$lang['mailbox']['address_rewriting'];?></a></li>
33 <li role="presentation"<?=($_SESSION['mailcow_cc_role'] == "admin") ?: ' class="hidden"';?>><a href="#tab-tls-policy" aria-controls="tab-tls-policy" role="tab" data-toggle="tab"><?=$lang['mailbox']['tls_policy_maps'];?></a></li>
34 </ul>
35
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +020036 <div class="row">
37 <div class="col-md-12">
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010038 <div class="tab-content" style="padding-top:20px">
39 <div role="tabpanel" class="tab-pane active" id="tab-domains">
40 <div class="panel panel-default">
41 <div class="panel-heading">
42 <?=$lang['mailbox']['domains'];?> <span class="badge badge-info table-lines"></span>
43 <div class="btn-group pull-right hidden-xs">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +020044 <? if($_SESSION['mailcow_cc_role'] == "admin"): ?><button class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addDomainModal"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_domain'];?></button><? endif; ?>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010045 <button class="btn btn-xs btn-default refresh_table" data-draw="draw_domain_table" data-table="domain_table"><?=$lang['admin']['refresh'];?></button>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +020046 <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010047 <span class="caret"></span>
48 </button>
49 <ul class="dropdown-menu" data-table-id="domain_table" role="menu">
50 <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li>
51 <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li>
52 <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li>
53 <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li>
54 <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li>
55 <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li>
56 </ul>
57 </div>
58 </div>
59 <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> -->
60 <div class="table-responsive">
61 <table id="domain_table" class="table table-striped"></table>
62 </div>
63 <div class="mass-actions-mailbox">
64 <div class="btn-group">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +020065 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="toggle_multi_select_all" data-id="domain" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
66 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010067 <ul class="dropdown-menu">
68 <? if($_SESSION['mailcow_cc_role'] == "admin"): ?>
69 <li><a data-action="edit_selected" data-id="domain" data-api-url='edit/domain' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
70 <li><a data-action="edit_selected" data-id="domain" data-api-url='edit/domain' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
71 <li role="separator" class="divider"></li>
72 <li><a data-action="delete_selected" data-id="domain" data-api-url='delete/domain' href="#"><?=$lang['mailbox']['remove'];?></a></li>
73 <? endif; ?>
74 </ul>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +020075 <div class="clearfix visible-xs"></div>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010076 <? if($_SESSION['mailcow_cc_role'] == "admin"): ?>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +020077 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" href="#" data-toggle="modal" data-target="#addDomainModal"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_domain'];?></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010078 <? endif; ?>
79 </div>
80 </div>
81 </div>
82 </div>
83
84 <div role="tabpanel" class="tab-pane" id="tab-mailbox-defaults">
85 <div class="panel panel-default">
86 <div class="panel-heading">
87 <?=$lang['mailbox']['mailbox_defaults'];?>
88 </div>
89 <div class="panel-body help-block">
90 <?=$lang['mailbox']['mailbox_defaults_info'];?>
91 </div>
92 </div>
93 </div>
94
95 <div role="tabpanel" class="tab-pane" id="tab-mailboxes">
96 <div class="panel panel-default">
97 <div class="panel-heading">
98 <?=$lang['mailbox']['mailboxes'];?> <span class="badge badge-info table-lines"></span>
99 <div class="btn-group pull-right hidden-xs">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200100 <button class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addMailboxModal"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_mailbox'];?></button>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100101 <button class="btn btn-xs btn-default refresh_table" data-draw="draw_mailbox_table" data-table="mailbox_table"><?=$lang['admin']['refresh'];?></button>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200102 <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100103 <span class="caret"></span>
104 </button>
105 <ul class="dropdown-menu" data-table-id="mailbox_table" role="menu">
106 <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li>
107 <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li>
108 <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li>
109 <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li>
110 <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li>
111 <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li>
112 </ul>
113 </div>
114 </div>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200115 <div class="mass-actions-mailbox hidden-xs" data-actions-header="true"></div>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100116 <div class="table-responsive">
117 <table id="mailbox_table" class="table table-striped"></table>
118 </div>
119 <div class="mass-actions-mailbox">
120 <div class="btn-group hidden-md hidden-lg hidden-xl">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200121 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="toggle_multi_select_all" data-id="mailbox" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
122 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100123 <ul class="dropdown-menu">
124 <li class="dropdown-header"><?=$lang['mailbox']['mailbox'];?></li>
125 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
126 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
127 <li><a data-action="delete_selected" data-id="mailbox" data-api-url='delete/mailbox' href="#"><?=$lang['mailbox']['remove'];?></a></li>
128 <li role="separator" class="divider"></li>
129 <li class="dropdown-header"><?=$lang['mailbox']['tls_enforce_in'];?></li>
130 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_in":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
131 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_in":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
132 <li role="separator" class="divider"></li>
133 <li class="dropdown-header"><?=$lang['mailbox']['tls_enforce_out'];?></li>
134 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_out":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
135 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_out":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
136 <li role="separator" class="divider"></li>
137 <li class="dropdown-header"><?=$lang['mailbox']['quarantine_notification'];?></li>
138 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"hourly"}' href="#"><?=$lang['user']['hourly'];?></a></li>
139 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"daily"}' href="#"><?=$lang['user']['daily'];?></a></li>
140 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"weekly"}' href="#"><?=$lang['user']['weekly'];?></a></li>
141 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"never"}' href="#"><?=$lang['user']['never'];?></a></li>
142 <li role="separator" class="divider"></li>
143 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_category' data-api-attr='{"quarantine_category":"reject"}' href="#"><?=$lang['user']['q_reject'];?></a></li>
144 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_category' data-api-attr='{"quarantine_category":"add_header"}' href="#"><?=$lang['user']['q_add_header'];?></a></li>
145 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_category' data-api-attr='{"quarantine_category":"all"}' href="#"><?=$lang['user']['q_all'];?></a></li>
146 <li role="separator" class="divider"></li>
147 <li class="dropdown-header"><?=$lang['mailbox']['allowed_protocols'];?></li>
148 <li class="dropdown-header">IMAP</li>
149 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"imap_access":1}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
150 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"imap_access":0}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
151 <li role="separator" class="divider"></li>
152 <li class="dropdown-header">POP3</li>
153 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"pop3_access":1}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
154 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"pop3_access":0}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
155 <li role="separator" class="divider"></li>
156 <li class="dropdown-header">SMTP</li>
157 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"smtp_access":1}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
158 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"smtp_access":0}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
159 </ul>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200160 <div class="clearfix visible-xs"></div>
161 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" href="#" data-toggle="modal" data-target="#addMailboxModal"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_mailbox'];?></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100162 </div>
163 <div class="btn-group hidden-xs hidden-sm">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200164 <a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="mailbox" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100165 <div class="btn-group">
166 <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['mailbox'];?> <span class="caret"></span></a>
167 <ul class="dropdown-menu">
168 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
169 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"active":"2"}' href="#"><?=$lang['mailbox']['disable_login'];?></a></li>
170 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
171 <li role="separator" class="divider"></li>
172 <li><a data-action="delete_selected" data-id="mailbox" data-api-url='delete/mailbox' href="#"><?=$lang['mailbox']['remove'];?></a></li>
173 </ul>
174 </div>
175 <div class="btn-group">
176 <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#">TLS <span class="caret"></span></a>
177 <ul class="dropdown-menu">
178 <li class="dropdown-header"><?=$lang['mailbox']['tls_enforce_in'];?></li>
179 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_in":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
180 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_in":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
181 <li role="separator" class="divider"></li>
182 <li class="dropdown-header"><?=$lang['mailbox']['tls_enforce_out'];?></li>
183 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_out":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
184 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_out":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
185 </ul>
186 </div>
187 <div class="btn-group">
188 <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['allowed_protocols'];?> <span class="caret"></span></a>
189 <ul class="dropdown-menu">
190 <li class="dropdown-header">IMAP</li>
191 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"imap_access":1}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
192 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"imap_access":0}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
193 <li role="separator" class="divider"></li>
194 <li class="dropdown-header">POP3</li>
195 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"pop3_access":1}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
196 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"pop3_access":0}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
197 <li role="separator" class="divider"></li>
198 <li class="dropdown-header">SMTP</li>
199 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"smtp_access":1}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
200 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"smtp_access":0}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
201 </ul>
202 </div>
203 <div class="btn-group">
204 <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quarantine_notification'];?> <span class="caret"></span></a>
205 <ul class="dropdown-menu">
206 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"hourly"}' href="#"><?=$lang['user']['hourly'];?></a></li>
207 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"daily"}' href="#"><?=$lang['user']['daily'];?></a></li>
208 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"weekly"}' href="#"><?=$lang['user']['weekly'];?></a></li>
209 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"never"}' href="#"><?=$lang['user']['never'];?></a></li>
210 <li role="separator" class="divider"></li>
211 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_category' data-api-attr='{"quarantine_category":"reject"}' href="#"><?=$lang['user']['q_reject'];?></a></li>
212 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_category' data-api-attr='{"quarantine_category":"add_header"}' href="#"><?=$lang['user']['q_add_header'];?></a></li>
213 <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_category' data-api-attr='{"quarantine_category":"all"}' href="#"><?=$lang['user']['q_all'];?></a></li>
214 </ul>
215 </div>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200216 <a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addMailboxModal"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_mailbox'];?></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100217 </div>
218 </div>
219 </div>
220 </div>
221
222 <div role="tabpanel" class="tab-pane" id="tab-resources">
223 <div class="panel panel-default">
224 <div class="panel-heading">
225 <?=$lang['mailbox']['resources'];?> <span class="badge badge-info table-lines"></span>
226 <div class="btn-group pull-right hidden-xs">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200227 <button class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addResourceModal"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_resource'];?></button>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100228 <button class="btn btn-xs btn-default refresh_table" data-draw="draw_resource_table" data-table="resource_table"><?=$lang['admin']['refresh'];?></button>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200229 <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100230 <span class="caret"></span>
231 </button>
232 <ul class="dropdown-menu" data-table-id="resource_table" role="menu">
233 <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li>
234 <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li>
235 <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li>
236 <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li>
237 <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li>
238 <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li>
239 </ul>
240 </div>
241 </div>
242 <div class="panel-body help-block">
243 <p><span class="label label-success"><?=$lang['mailbox']['booking_0_short'];?></span> - <?=$lang['mailbox']['booking_0'];?></p>
244 <p><span class="label label-warning"><?=$lang['mailbox']['booking_lt0_short'];?></span> - <?=$lang['mailbox']['booking_lt0'];?></p>
245 <p><span class="label label-danger"><?=$lang['mailbox']['booking_custom_short'];?></span> - <?=$lang['mailbox']['booking_custom'];?></p>
246 </div>
247 <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> -->
248 <div class="table-responsive">
249 <table id="resource_table" class="table table-striped"></table>
250 </div>
251 <div class="mass-actions-mailbox">
252 <div class="btn-group">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200253 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="toggle_multi_select_all" data-id="resource" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
254 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100255 <ul class="dropdown-menu">
256 <li><a data-action="edit_selected" data-id="resource" data-api-url='edit/resource' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
257 <li><a data-action="edit_selected" data-id="resource" data-api-url='edit/resource' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
258 <li role="separator" class="divider"></li>
259 <li><a data-action="delete_selected" data-id="resource" data-api-url='delete/resource' href="#"><?=$lang['mailbox']['remove'];?></a></li>
260 </ul>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200261 <div class="clearfix visible-xs"></div>
262 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" href="#" data-toggle="modal" data-target="#addResourceModal"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_resource'];?></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100263 </div>
264 </div>
265 </div>
266 </div>
267
268 <div role="tabpanel" class="tab-pane" id="tab-domain-aliases">
269 <div class="panel panel-default">
270 <div class="panel-heading">
271 <?=$lang['mailbox']['domain_aliases'];?> <span class="badge badge-info table-lines"></span>
272 <div class="btn-group pull-right hidden-xs">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200273 <button class="btn btn-xs btn-success" href="#" data-acl="<?=$_SESSION['acl']['alias_domains'];?>" data-toggle="modal" data-target="#addAliasDomainModal"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_domain_alias'];?></button>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100274 <button class="btn btn-xs btn-default refresh_table" data-draw="draw_aliasdomain_table" data-table="aliasdomain_table"><?=$lang['admin']['refresh'];?></button>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200275 <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100276 <span class="caret"></span>
277 </button>
278 <ul class="dropdown-menu" data-table-id="aliasdomain_table" role="menu">
279 <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li>
280 <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li>
281 <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li>
282 <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li>
283 <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li>
284 <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li>
285 </ul>
286 </div>
287 </div>
288 <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> -->
289 <div class="table-responsive">
290 <table id="aliasdomain_table" class="table table-striped"></table>
291 </div>
292 <div class="mass-actions-mailbox">
293 <div class="btn-group">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200294 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="toggle_multi_select_all" data-id="alias-domain" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
295 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100296 <ul class="dropdown-menu">
297 <li><a data-action="edit_selected" data-id="alias-domain" data-api-url='edit/alias-domain' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
298 <li><a data-action="edit_selected" data-id="alias-domain" data-api-url='edit/alias-domain' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
299 <li role="separator" class="divider"></li>
300 <li><a data-action="delete_selected" data-id="alias-domain" data-api-url='delete/alias-domain' href="#"><?=$lang['mailbox']['remove'];?></a></li>
301 </ul>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200302 <div class="clearfix visible-xs"></div>
303 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" href="#" data-acl="<?=$_SESSION['acl']['alias_domains'];?>" data-toggle="modal" data-target="#addAliasDomainModal"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_domain_alias'];?></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100304 </div>
305 </div>
306 </div>
307 </div>
308
309 <div role="tabpanel" class="tab-pane" id="tab-mbox-aliases">
310 <div class="panel panel-default">
311 <div class="panel-heading">
312 <?=$lang['mailbox']['aliases'];?> <span class="badge badge-info table-lines"></span>
313 <div class="btn-group pull-right hidden-xs">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200314 <button class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addAliasModal"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_alias'];?></button>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100315 <button class="btn btn-xs btn-default refresh_table" data-draw="draw_alias_table" data-table="alias_table"><?=$lang['admin']['refresh'];?></button>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200316 <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100317 <span class="caret"></span>
318 </button>
319 <ul class="dropdown-menu" data-table-id="alias_table" role="menu">
320 <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li>
321 <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li>
322 <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li>
323 <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li>
324 <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li>
325 <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li>
326 </ul>
327 </div>
328 </div>
329 <div class="panel-body help-block">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200330 <?=$lang['mailbox']['alias_domain_alias_hint'];?>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100331 </div>
332 <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> -->
333 <div class="table-responsive">
334 <table id="alias_table" class="table table-striped"></table>
335 </div>
336 <div class="mass-actions-mailbox">
337 <div class="btn-group">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200338 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="toggle_multi_select_all" data-id="alias" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
339 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
340 <ul class="dropdown-menu top33">
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100341 <li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
342 <li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
343 <li role="separator" class="divider"></li>
344 <li><a data-action="delete_selected" data-id="alias" data-api-url='delete/alias' href="#"><?=$lang['mailbox']['remove'];?></a></li>
345 <?php if (getenv('SKIP_SOGO') != "y") { ?>
346 <li role="separator" class="divider"></li>
347 <li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"sogo_visible":"1"}' href="#"><?=$lang['mailbox']['sogo_visible_y'];?></a></li>
348 <li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"sogo_visible":"0"}' href="#"><?=$lang['mailbox']['sogo_visible_n'];?></a></li>
349 <?php } ?>
350 </ul>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200351 <div class="clearfix visible-xs"></div>
352 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"expand_alias":true}' ><i class="bi bi-arrows-angle-expand"></i> <?=$lang['mailbox']['add_alias_expand'];?></a>
353 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" href="#" data-toggle="modal" data-target="#addAliasModal"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_alias'];?></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100354 </div>
355 </div>
356 </div>
357 </div>
358
359 <div role="tabpanel" class="tab-pane" id="tab-syncjobs">
360 <div class="panel panel-default">
361 <div class="panel-heading">
362 <?=$lang['mailbox']['sync_jobs'];?> <span class="badge badge-info table-lines"></span>
363 <div class="btn-group pull-right hidden-xs">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200364 <button data-acl="<?=$_SESSION['acl']['syncjobs'];?>" class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addSyncJobModalAdmin"><i class="bi bi-plus-lg"></i> <?=$lang['user']['create_syncjob'];?></button>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100365 <button class="btn btn-xs btn-default refresh_table" data-draw="draw_sync_job_table" data-table="sync_job_table"><?=$lang['admin']['refresh'];?></button>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200366 <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100367 <span class="caret"></span>
368 </button>
369 <ul class="dropdown-menu" data-table-id="sync_job_table" role="menu">
370 <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li>
371 <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li>
372 <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li>
373 <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li>
374 <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li>
375 <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li>
376 </ul>
377 </div>
378 </div>
379 <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> -->
380 <div class="table-responsive">
381 <table class="table table-striped" id="sync_job_table"></table>
382 </div>
383 <div class="mass-actions-mailbox">
384 <div class="btn-group" data-acl="<?=$_SESSION['acl']['syncjobs'];?>">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200385 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="toggle_multi_select_all" data-id="syncjob" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
386 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100387 <ul class="dropdown-menu">
388 <li><a data-action="edit_selected" data-id="syncjob" data-api-url='edit/syncjob' data-api-attr='{"last_run":""}' href="#"><?=$lang['mailbox']['last_run_reset'];?></a></li>
389 <li role="separator" class="divider"></li>
390 <li><a data-action="edit_selected" data-id="syncjob" data-api-url='edit/syncjob' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
391 <li><a data-action="edit_selected" data-id="syncjob" data-api-url='edit/syncjob' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
392 <li role="separator" class="divider"></li>
393 <li><a data-action="delete_selected" data-id="syncjob" data-api-url='delete/syncjob' href="#"><?=$lang['mailbox']['remove'];?></a></li>
394 </ul>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200395 <div class="clearfix visible-xs"></div>
396 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" href="#" data-toggle="modal" data-target="#addSyncJobModalAdmin"><i class="bi bi-plus-lg"></i> <?=$lang['user']['create_syncjob'];?></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100397 </div>
398 </div>
399 </div>
400 </div>
401
402 <div role="tabpanel" class="tab-pane" id="tab-filters">
403 <div class="panel panel-default">
404 <div class="panel-heading">
405 <?=$lang['mailbox']['filters'];?> <span class="badge badge-info table-lines"></span>
406 <div class="btn-group pull-right hidden-xs">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200407 <button class="btn btn-xs btn-success" href="#" data-acl="<?=$_SESSION['acl']['filters'];?>" data-toggle="modal" data-target="#addFilterModalAdmin"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_filter'];?></button>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100408 <button class="btn btn-xs btn-default refresh_table" data-draw="draw_filter_table" data-table="filter_table"><?=$lang['admin']['refresh'];?></button>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200409 <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100410 <span class="caret"></span>
411 </button>
412 <ul class="dropdown-menu" data-table-id="filter_table" role="menu">
413 <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li>
414 <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li>
415 <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li>
416 <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li>
417 <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li>
418 <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li>
419 </ul>
420 </div>
421 </div>
422 <div class="panel-body">
423 <p class="help-block"><?=$lang['mailbox']['sieve_info'];?></p><br>
424 </div>
425 <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> -->
426 <div class="table-responsive">
427 <table class="table table-striped" id="filter_table"></table>
428 </div>
429 <div class="mass-actions-mailbox">
430 <div class="btn-group" data-acl="<?=$_SESSION['acl']['filters'];?>">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200431 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="toggle_multi_select_all" data-id="filter_item" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
432 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100433 <ul class="dropdown-menu">
434 <li><a data-action="edit_selected" data-id="filter_item" data-api-url='edit/filter' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
435 <li><a data-action="edit_selected" data-id="filter_item" data-api-url='edit/filter' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
436 <li role="separator" class="divider"></li>
437 <li><a data-action="edit_selected" data-id="filter_item" data-api-url='edit/filter' data-api-attr='{"filter_type":"prefilter"}' href="#"><?=$lang['mailbox']['set_prefilter'];?></a></li>
438 <li><a data-action="edit_selected" data-id="filter_item" data-api-url='edit/filter' data-api-attr='{"filter_type":"postfilter"}' href="#"><?=$lang['mailbox']['set_postfilter'];?></a></li>
439 <li role="separator" class="divider"></li>
440 <li><a data-action="delete_selected" data-text="<?=$lang['user']['eas_reset'];?>?" data-id="filter_item" data-api-url='delete/filter' href="#"><?=$lang['mailbox']['remove'];?></a></li>
441 </ul>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200442 <div class="clearfix visible-xs"></div>
443 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" href="#" data-toggle="modal" data-target="#addFilterModalAdmin"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_filter'];?></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100444 </div>
445 </div>
446 <div class="panel-body <?=($_SESSION['mailcow_cc_role'] == "admin") ?: 'hidden';?>">
447 <?php
448 $global_filters = mailbox('get', 'global_filter_details');
449 ?>
450 <div class="row">
451 <div class="col-lg-6">
452 <h5>Global Prefilter</h5>
453 <form class="form-horizontal" data-cached-form="false" role="form" data-id="add_prefilter">
454 <div class="form-group">
455 <div class="col-sm-12">
456 <textarea autocorrect="off" spellcheck="false" autocapitalize="none" class="form-control textarea-code script_data" rows="10" name="script_data" required><?=$global_filters['prefilter'];?></textarea>
457 </div>
458 </div>
459 <div class="form-group">
460 <div class="col-sm-10 add_filter_btns">
461 <div class="btn-group">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200462 <button class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default validate_sieve" href="#"><?=$lang['add']['validate'];?></button>
463 <button class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success add_sieve_script" data-action="add_item" data-id="add_prefilter" data-api-url='add/global-filter' data-api-attr='{"filter_type":"prefilter"}' href="#" disabled><i class="bi bi-check-lg"></i> <?=$lang['admin']['save'];?></button>
464 <div class="clearfix visible-xs"></div>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100465 </div>
466 </div>
467 </div>
468 </form>
469 </div>
470 <div class="col-lg-6">
471 <h5>Global Postfilter</h5>
472 <form class="form-horizontal" data-cached-form="false" role="form" data-id="add_postfilter">
473 <div class="form-group">
474 <div class="col-sm-12">
475 <textarea autocorrect="off" spellcheck="false" autocapitalize="none" class="form-control textarea-code script_data" rows="10" name="script_data" required><?=$global_filters['postfilter'];?></textarea>
476 </div>
477 </div>
478 <div class="form-group">
479 <div class="col-sm-10 add_filter_btns">
480 <div class="btn-group">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200481 <button class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default validate_sieve" href="#"><?=$lang['add']['validate'];?></button>
482 <button class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success add_sieve_script" data-action="add_item" data-id="add_postfilter" data-api-url='add/global-filter' data-api-attr='{"filter_type":"postfilter"}' href="#" disabled><i class="bi bi-check-lg"></i> <?=$lang['admin']['save'];?></button>
483 <div class="clearfix visible-xs"></div>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100484 </div>
485 </div>
486 </div>
487 </form>
488 </div>
489 </div>
490 </div>
491 </div>
492 </div>
493
494 <div role="tabpanel" class="tab-pane" id="tab-bcc">
495 <div class="panel panel-default">
496 <div class="panel-heading">
497 <?=$lang['mailbox']['bcc_maps'];?> <span class="badge badge-info table-lines"></span>
498 <div class="btn-group pull-right hidden-xs">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200499 <button class="btn btn-xs btn-success" href="#" data-acl="<?=$_SESSION['acl']['bcc_maps'];?>" data-toggle="modal" data-target="#addBCCModalAdmin"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_bcc_entry'];?></button>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100500 <button class="btn btn-xs btn-default refresh_table" data-draw="draw_bcc_table" data-table="bcc_table"><?=$lang['admin']['refresh'];?></button>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200501 <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100502 <span class="caret"></span>
503 </button>
504 <ul class="dropdown-menu" data-table-id="bcc_table" role="menu">
505 <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li>
506 <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li>
507 <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li>
508 <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li>
509 <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li>
510 <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li>
511 </ul>
512 </div>
513 </div>
514 <p style="margin:10px" class="help-block"><?=$lang['mailbox']['bcc_info'];?></p>
515 <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> -->
516 <div class="table-responsive">
517 <table class="table table-striped" id="bcc_table"></table>
518 </div>
519 <div class="mass-actions-mailbox">
520 <div class="btn-group" data-acl="<?=$_SESSION['acl']['bcc_maps'];?>">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200521 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="toggle_multi_select_all" data-id="bcc" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
522 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100523 <ul class="dropdown-menu">
524 <li><a data-action="edit_selected" data-id="bcc" data-api-url='edit/bcc' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
525 <li><a data-action="edit_selected" data-id="bcc" data-api-url='edit/bcc' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
526 <li role="separator" class="divider"></li>
527 <li><a data-action="edit_selected" data-id="bcc" data-api-url='edit/bcc' data-api-attr='{"type":"sender"}' href="#"><?=$lang['mailbox']['bcc_to_sender'];?></a></li>
528 <li><a data-action="edit_selected" data-id="bcc" data-api-url='edit/bcc' data-api-attr='{"type":"rcpt"}' href="#"><?=$lang['mailbox']['bcc_to_rcpt'];?></a></li>
529 <li role="separator" class="divider"></li>
530 <li><a data-action="delete_selected" data-id="bcc" data-api-url='delete/bcc' href="#"><?=$lang['mailbox']['remove'];?></a></li>
531 </ul>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200532 <div class="clearfix visible-xs"></div>
533 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" href="#" data-toggle="modal" data-target="#addBCCModalAdmin"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_bcc_entry'];?></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100534 </div>
535 </div>
536 </div>
537 <div class="panel panel-default <?=($_SESSION['mailcow_cc_role'] == "admin") ?: 'hidden';?>">
538 <div class="panel-heading">
539 <?=$lang['mailbox']['recipient_maps'];?> <span class="badge badge-info table-lines"></span>
540 <div class="btn-group pull-right hidden-xs">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200541 <button class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addRecipientMapModalAdmin"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_recipient_map_entry'];?></button>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100542 <button class="btn btn-xs btn-default refresh_table" data-draw="draw_recipient_map_table" data-table="recipient_map_table"><?=$lang['admin']['refresh'];?></button>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200543 <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100544 <span class="caret"></span>
545 </button>
546 <ul class="dropdown-menu" data-table-id="recipient_map_table" role="menu">
547 <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li>
548 <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li>
549 <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li>
550 <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li>
551 <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li>
552 <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li>
553 </ul>
554 </div>
555 </div>
556 <p style="margin:10px" class="help-block"><?=$lang['mailbox']['recipient_map_info'];?></p>
557 <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> -->
558 <div class="table-responsive">
559 <table class="table table-striped" id="recipient_map_table"></table>
560 </div>
561 <div class="mass-actions-mailbox">
562 <div class="btn-group">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200563 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="toggle_multi_select_all" data-id="recipient_map" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
564 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100565 <ul class="dropdown-menu">
566 <li><a data-action="edit_selected" data-id="recipient_map" data-api-url='edit/recipient_map' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
567 <li><a data-action="edit_selected" data-id="recipient_map" data-api-url='edit/recipient_map' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
568 <li role="separator" class="divider"></li>
569 <li><a data-action="delete_selected" data-id="recipient_map" data-api-url='delete/recipient_map' href="#"><?=$lang['mailbox']['remove'];?></a></li>
570 </ul>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200571 <div class="clearfix visible-xs"></div>
572 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" href="#" data-toggle="modal" data-target="#addRecipientMapModalAdmin"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_recipient_map_entry'];?></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100573 </div>
574 </div>
575 </div>
576 </div>
577
578 <div role="tabpanel" class="tab-pane <?=($_SESSION['mailcow_cc_role'] == "admin") ?: 'hidden';?>" id="tab-tls-policy">
579 <div class="panel panel-default">
580 <div class="panel-heading">
581 <?=$lang['mailbox']['tls_policy_maps_long'];?> <span class="badge badge-info table-lines"></span>
582 <div class="btn-group pull-right hidden-xs">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200583 <button class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addTLSPolicyMapAdmin"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_tls_policy_map'];?></button>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100584 <button class="btn btn-xs btn-default refresh_table" data-draw="draw_tls_policy_table" data-table="tls_policy_table"><?=$lang['admin']['refresh'];?></button>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200585 <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100586 <span class="caret"></span>
587 </button>
588 <ul class="dropdown-menu" data-table-id="tls_policy_table" role="menu">
589 <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li>
590 <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li>
591 <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li>
592 <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li>
593 <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li>
594 <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li>
595 </ul>
596 </div>
597 </div>
598 <p style="margin:10px" class="help-block"><?=$lang['mailbox']['tls_policy_maps_info'];?></p>
599 <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> -->
600 <div class="table-responsive">
601 <table class="table table-striped" id="tls_policy_table"></table>
602 </div>
603 <div class="mass-actions-mailbox">
604 <div class="btn-group">
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200605 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="toggle_multi_select_all" data-id="tls-policy-map" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
606 <a class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100607 <ul class="dropdown-menu">
608 <li><a data-action="edit_selected" data-id="tls-policy-map" data-api-url='edit/tls-policy-map' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
609 <li><a data-action="edit_selected" data-id="tls-policy-map" data-api-url='edit/tls-policy-map' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
610 <li role="separator" class="divider"></li>
611 <li><a data-action="delete_selected" data-id="tls-policy-map" data-api-url='delete/tls-policy-map' href="#"><?=$lang['mailbox']['remove'];?></a></li>
612 </ul>
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200613 <div class="clearfix visible-xs"></div>
614 <a class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" href="#" data-toggle="modal" data-target="#addTLSPolicyMapAdmin"><i class="bi bi-plus-lg"></i> <?=$lang['mailbox']['add_tls_policy_map'];?></a>
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100615 </div>
616 </div>
617 </div>
618 </div>
619 </div> <!-- /tab-content -->
620 </div> <!-- /col-md-12 -->
621 </div> <!-- /row -->
622</div> <!-- /container -->
623<?php
624require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/mailbox.php';
625?>
626<script type='text/javascript'>
627<?php
628$lang_mailbox = json_encode($lang['mailbox']);
629echo "var lang = ". $lang_mailbox . ";\n";
630echo "var acl = '". json_encode($_SESSION['acl']) . "';\n";
631echo "var csrf_token = '". $_SESSION['CSRF']['TOKEN'] . "';\n";
632$role = ($_SESSION['mailcow_cc_role'] == "admin") ? 'admin' : 'domainadmin';
633$is_dual = (!empty($_SESSION["dual-login"]["username"])) ? 'true' : 'false';
634echo "var role = '". $role . "';\n";
635echo "var is_dual = " . $is_dual . ";\n";
636echo "var pagination_size = '". $PAGINATION_SIZE . "';\n";
637$ALLOW_ADMIN_EMAIL_LOGIN = (preg_match(
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200638 "/^([yY][eE][sS]|[yY])+$/",
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100639 $_ENV["ALLOW_ADMIN_EMAIL_LOGIN"]
640)) ? "true" : "false";
641echo "var ALLOW_ADMIN_EMAIL_LOGIN = " . $ALLOW_ADMIN_EMAIL_LOGIN . ";\n";
642?>
643</script>
644<?php
645$js_minifier->add('/web/js/site/mailbox.js');
646$js_minifier->add('/web/js/presets/sieveMailbox.js');
647$js_minifier->add('/web/js/site/pwgen.js');
648require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
649}
650else {
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +0200651 header('Location: /');
652 exit();
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100653}
654?>