[Web] Fix sieve example insert

master
andryyy 2020-03-19 12:46:39 +01:00
parent e1897b0631
commit 2b1ff6c9a3
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
3 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ function presets($_action, $_kind) {
global $lang;
switch ($_action) {
case 'get':
if ($_SESSION['mailcow_cc_role'] != "admin") {
if ($_SESSION['mailcow_cc_role'] != "admin" && $_SESSION['mailcow_cc_role'] != "domainadmin") {
return false;
}
$presets = array();

View File

@ -22,7 +22,7 @@ if (sieve_presetsElem) {
document.getElementById(elemID).addEventListener('click', function (e) {
e.preventDefault();
document.querySelector('form[data-id=add_filter] #script_desc').value = item.headline;
document.querySelector('form[data-id=add_filter] #script_data').value = item.content;
document.querySelector('form[data-id=add_filter] .script_data').value = item.content;
return true;
});
}, 0);

View File

@ -351,7 +351,7 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
<a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addFilterModalAdmin"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_filter'];?></a>
</div>
</div>
<div class="panel-body">
<div class="panel-body <?=($_SESSION['mailcow_cc_role'] == "admin") ?: 'hidden';?>">
<?php
$global_filters = mailbox('get', 'global_filter_details');
?>