[Web] Change quarantine notification interval as admin when editing a mailbox

master
andryyy 2019-09-12 08:28:50 +02:00
parent 261c2a5850
commit bba8e4f70c
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
3 changed files with 36 additions and 2 deletions

View File

@ -506,6 +506,7 @@ if (isset($_SESSION['mailcow_cc_role'])) {
$mailbox = html_entity_decode(rawurldecode($_GET["mailbox"])); $mailbox = html_entity_decode(rawurldecode($_GET["mailbox"]));
$result = mailbox('get', 'mailbox_details', $mailbox); $result = mailbox('get', 'mailbox_details', $mailbox);
$rl = ratelimit('get', 'mailbox', $mailbox); $rl = ratelimit('get', 'mailbox', $mailbox);
$quarantine_notification = mailbox('get', 'quarantine_notification', $mailbox);
if (!empty($result)) { if (!empty($result)) {
?> ?>
<h4><?=$lang['edit']['mailbox'];?></h4> <h4><?=$lang['edit']['mailbox'];?></h4>
@ -592,6 +593,39 @@ if (isset($_SESSION['mailcow_cc_role'])) {
<small class="help-block"><?=$lang['edit']['sender_acl_info'];?></small> <small class="help-block"><?=$lang['edit']['sender_acl_info'];?></small>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label col-sm-2" for="sender_acl"><?=$lang['user']['quarantine_notification'];?></label>
<div class="col-sm-10">
<div class="btn-group" data-acl="<?=$_SESSION['acl']['quarantine_notification'];?>">
<button type="button" class="btn btn-sm btn-default <?=($quarantine_notification == "never") ? "active" : null;?>"
data-action="edit_selected"
data-item="<?= htmlentities($mailbox); ?>"
data-id="quarantine_notification"
data-api-url='edit/quarantine_notification'
data-api-attr='{"quarantine_notification":"never"}'><?=$lang['user']['never'];?></button>
<button type="button" class="btn btn-sm btn-default <?=($quarantine_notification == "hourly") ? "active" : null;?>"
data-action="edit_selected"
data-item="<?= htmlentities($mailbox); ?>"
data-id="quarantine_notification"
data-api-url='edit/quarantine_notification'
data-api-attr='{"quarantine_notification":"hourly"}'><?=$lang['user']['hourly'];?></button>
<button type="button" class="btn btn-sm btn-default <?=($quarantine_notification == "daily") ? "active" : null;?>"
data-action="edit_selected"
data-item="<?= htmlentities($mailbox); ?>"
data-id="quarantine_notification"
data-api-url='edit/quarantine_notification'
data-api-attr='{"quarantine_notification":"daily"}'><?=$lang['user']['daily'];?></button>
<button type="button" class="btn btn-sm btn-default <?=($quarantine_notification == "weekly") ? "active" : null;?>"
data-action="edit_selected"
data-item="<?= htmlentities($mailbox); ?>"
data-id="quarantine_notification"
data-api-url='edit/quarantine_notification'
data-api-attr='{"quarantine_notification":"weekly"}'><?=$lang['user']['weekly'];?></button>
</div>
<div style="display:none" id="user_acl_q_notify_disabled"><?=$lang['edit']['user_acl_q_notify_disabled'];?></div>
<p class="help-block"><small><?=$lang['user']['quarantine_notification_info'];?></small></p>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" for="password"><?=$lang['edit']['password'];?></label> <label class="control-label col-sm-2" for="password"><?=$lang['edit']['password'];?></label>
<div class="col-sm-10"> <div class="col-sm-10">

View File

@ -403,7 +403,7 @@ $lang['acl']['syncjobs'] = 'Sync Jobs';
$lang['acl']['eas_reset'] = 'EAS-Cache zurücksetzen'; $lang['acl']['eas_reset'] = 'EAS-Cache zurücksetzen';
$lang['acl']['sogo_profile_reset'] = 'SOGo Profil zurücksetzen'; $lang['acl']['sogo_profile_reset'] = 'SOGo Profil zurücksetzen';
$lang['acl']['quarantine'] = 'Quarantäne-Aktionen'; $lang['acl']['quarantine'] = 'Quarantäne-Aktionen';
$lang['acl']['quarantine_notification'] = 'Quarantäne-Benachrichtigung'; $lang['acl']['quarantine_notification'] = 'Ändern der Quarantäne-Benachrichtigung';
$lang['acl']['quarantine_attachments'] = 'Anhänge aus Quarantäne'; $lang['acl']['quarantine_attachments'] = 'Anhänge aus Quarantäne';
$lang['acl']['alias_domains'] = 'Alias-Domains hinzufügen'; $lang['acl']['alias_domains'] = 'Alias-Domains hinzufügen';
$lang['acl']['login_as'] = 'Einloggen als Mailbox-Benutzer'; $lang['acl']['login_as'] = 'Einloggen als Mailbox-Benutzer';

View File

@ -416,7 +416,7 @@ $lang['acl']['syncjobs'] = 'Sync jobs';
$lang['acl']['eas_reset'] = 'Reset EAS devices'; $lang['acl']['eas_reset'] = 'Reset EAS devices';
$lang['acl']['sogo_profile_reset'] = 'Reset SOGo profile'; $lang['acl']['sogo_profile_reset'] = 'Reset SOGo profile';
$lang['acl']['quarantine'] = 'Quarantine actions'; $lang['acl']['quarantine'] = 'Quarantine actions';
$lang['acl']['quarantine_notification'] = 'Quarantine notifications'; $lang['acl']['quarantine_notification'] = 'Change quarantine notifications';
$lang['acl']['quarantine_attachments'] = 'Quarantine attachments'; $lang['acl']['quarantine_attachments'] = 'Quarantine attachments';
$lang['acl']['alias_domains'] = 'Add alias domains'; $lang['acl']['alias_domains'] = 'Add alias domains';
$lang['acl']['login_as'] = 'Login as mailbox user'; $lang['acl']['login_as'] = 'Login as mailbox user';