[Web] Fix sieve example insert
parent
e1897b0631
commit
2b1ff6c9a3
|
@ -3,7 +3,7 @@ function presets($_action, $_kind) {
|
||||||
global $lang;
|
global $lang;
|
||||||
switch ($_action) {
|
switch ($_action) {
|
||||||
case 'get':
|
case 'get':
|
||||||
if ($_SESSION['mailcow_cc_role'] != "admin") {
|
if ($_SESSION['mailcow_cc_role'] != "admin" && $_SESSION['mailcow_cc_role'] != "domainadmin") {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$presets = array();
|
$presets = array();
|
||||||
|
|
|
@ -22,7 +22,7 @@ if (sieve_presetsElem) {
|
||||||
document.getElementById(elemID).addEventListener('click', function (e) {
|
document.getElementById(elemID).addEventListener('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
document.querySelector('form[data-id=add_filter] #script_desc').value = item.headline;
|
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;
|
return true;
|
||||||
});
|
});
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
|
@ -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>
|
<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>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body <?=($_SESSION['mailcow_cc_role'] == "admin") ?: 'hidden';?>">
|
||||||
<?php
|
<?php
|
||||||
$global_filters = mailbox('get', 'global_filter_details');
|
$global_filters = mailbox('get', 'global_filter_details');
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue