diff --git a/data/web/admin.php b/data/web/admin.php index 3ec9e52d..385e1bef 100644 --- a/data/web/admin.php +++ b/data/web/admin.php @@ -115,9 +115,7 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC - - - +
:
@@ -134,7 +132,7 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC ?> - + ' : NULL; ?>
@@ -1121,12 +1119,12 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
- +

- - +
+

(http://larentis.eu) - * @license Apache-2.0 - */ - -.bootstrap-switch{display:inline-block;direction:ltr;cursor:pointer;border-radius:4px;border:1px solid #ccc;position:relative;text-align:left;overflow:hidden;line-height:8px;z-index:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.bootstrap-switch .bootstrap-switch-container{display:inline-block;top:0;border-radius:4px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:inline-block!important;height:100%;padding:6px 12px;font-size:14px;line-height:20px}.bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-handle-on{text-align:center;z-index:1}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary{color:#fff;background:#337ab7}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info{color:#fff;background:#5bc0de}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success{color:#fff;background:#5cb85c}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning{background:#f0ad4e;color:#fff}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger{color:#fff;background:#d9534f}.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default{color:#000;background:#eee}.bootstrap-switch .bootstrap-switch-label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;color:#333;background:#fff}.bootstrap-switch .bootstrap-switch-handle-on{border-bottom-left-radius:3px;border-top-left-radius:3px}.bootstrap-switch .bootstrap-switch-handle-off{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch input[type=radio],.bootstrap-switch input[type=checkbox]{position:absolute!important;top:0;left:0;margin:0;z-index:-1;opacity:0;filter:alpha(opacity=0)}.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label{padding:1px 5px;font-size:12px;line-height:1.5}.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label{padding:5px 10px;font-size:12px;line-height:1.5}.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label{padding:6px 16px;font-size:18px;line-height:1.3333333}.bootstrap-switch.bootstrap-switch-disabled,.bootstrap-switch.bootstrap-switch-indeterminate,.bootstrap-switch.bootstrap-switch-readonly{cursor:default!important}.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label{opacity:.5;filter:alpha(opacity=50);cursor:default!important}.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container{-webkit-transition:margin-left .5s;-o-transition:margin-left .5s;transition:margin-left .5s}.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on{border-radius:0 3px 3px 0}.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off{border-radius:3px 0 0 3px}.bootstrap-switch.bootstrap-switch-focused{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label{border-bottom-left-radius:3px;border-top-left-radius:3px} \ No newline at end of file diff --git a/data/web/css/build/008-mailcow.css b/data/web/css/build/008-mailcow.css index 8bd703fd..8af1f96a 100644 --- a/data/web/css/build/008-mailcow.css +++ b/data/web/css/build/008-mailcow.css @@ -160,9 +160,6 @@ legend { .lang-link-disabled { cursor: not-allowed; } -.dkim-label { - margin: 0 0 2px !important; -} .overlay { background: #fff; position: absolute; @@ -235,4 +232,13 @@ table.footable>tbody>tr.footable-empty>td { } .dropdown-menu > li > a { font-size: 1rem !important; +} +.label { + font-size:inherit; +} +[class^="bi-"]::before, [class*=" bi-"]::before { + vertical-align: -0.2em !important; +} +legend > [class^="bi-"]::before, legend > [class*=" bi-"]::before { + vertical-align: 0em !important; } \ No newline at end of file diff --git a/data/web/css/site/admin.css b/data/web/css/site/admin.css index bd7e5d69..bff4f204 100644 --- a/data/web/css/site/admin.css +++ b/data/web/css/site/admin.css @@ -81,4 +81,7 @@ table tbody tr td input[type="checkbox"] { .key-action { font-weight:bold; color:white !important; +} +.dkim-label { + margin: 0 0 8px !important; } \ No newline at end of file diff --git a/data/web/css/site/mailbox.css b/data/web/css/site/mailbox.css index 7b15e8c2..81e1ff3f 100644 --- a/data/web/css/site/mailbox.css +++ b/data/web/css/site/mailbox.css @@ -53,8 +53,12 @@ table tbody tr { table tbody tr td input[type="checkbox"] { cursor: pointer; } +.label-last-login .bi { + font-size: 8pt !important; +} .label-last-login { line-height: 2.5; color: #4a4a4a!important; background-color: #ececec!important; } + diff --git a/data/web/css/site/quarantine.css b/data/web/css/site/quarantine.css index 9ad19f0f..6f601f8c 100644 --- a/data/web/css/site/quarantine.css +++ b/data/web/css/site/quarantine.css @@ -95,6 +95,4 @@ table tbody tr td input[type="checkbox"] { font-size:110%; margin:20px; } -.label { - font-size:inherit; -} + diff --git a/data/web/edit.php b/data/web/edit.php index 190628dd..fa061523 100644 --- a/data/web/edit.php +++ b/data/web/edit.php @@ -254,15 +254,16 @@ if (isset($_SESSION['mailcow_cc_role'])) { !empty($_GET["domain"])) { $domain = $_GET["domain"]; $result = mailbox('get', 'domain_details', $domain); + $quota_notification_bcc = quota_notification_bcc('get', $domain); $rl = ratelimit('get', 'domain', $domain); $rlyhosts = relayhost('get'); if (!empty($result)) { ?> -
+
+
+
+

+

+
+ +
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
$address )); } + $gotos = array_unique($gotos); $gotos = array_filter($gotos); $goto = implode(",", $gotos); } diff --git a/data/web/inc/functions.quota_notification.inc.php b/data/web/inc/functions.quota_notification.inc.php index 574cc4e8..9f58bfb4 100644 --- a/data/web/inc/functions.quota_notification.inc.php +++ b/data/web/inc/functions.quota_notification.inc.php @@ -88,17 +88,27 @@ function quota_notification_bcc($_action, $_data = null) { return false; } $active = intval($_data['active']); - $bcc_rcpt = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $_data['bcc_rcpt']); - if (filter_var($bcc_rcpt, FILTER_VALIDATE_EMAIL) === false) { - $_SESSION['return'][] = array( - 'type' => 'danger', - 'log' => array(__FUNCTION__, $_action, $_data_log), - 'msg' => 'access_denied' - ); - return false; + $bcc_rcpts = array_map('trim', preg_split( "/( |,|;|\n)/", $_data['bcc_rcpt'])); + foreach ($bcc_rcpts as $i => &$rcpt) { + $rcpt = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $rcpt); + if (!empty($rcpt) && filter_var($rcpt, FILTER_VALIDATE_EMAIL) === false) { + $_SESSION['return'][] = array( + 'type' => 'danger', + 'log' => array(__FUNCTION__, $_action, $_data_log), + 'msg' => array('goto_invalid', htmlspecialchars($rcpt)) + ); + unset($bcc_rcpts[$i]); + continue; + } + } + $bcc_rcpts = array_unique($bcc_rcpts); + $bcc_rcpts = array_filter($bcc_rcpts); + if (empty($bcc_rcpts)) { + $active = 0; + } try { - $redis->hSet('QW_BCC', $domain, json_encode(array('bcc_rcpt' => $bcc_rcpt, 'active' => $active))); + $redis->hSet('QW_BCC', $domain, json_encode(array('bcc_rcpts' => $bcc_rcpts, 'active' => $active))); } catch (RedisException $e) { $_SESSION['return'][] = array( @@ -115,7 +125,7 @@ function quota_notification_bcc($_action, $_data = null) { ); break; case 'get': - $domain = $_data['domain']; + $domain = $_data; if (!hasDomainAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $domain)) { $_SESSION['return'][] = array( 'type' => 'danger', diff --git a/data/web/inc/header.inc.php b/data/web/inc/header.inc.php index 794c365c..a86ed42d 100644 --- a/data/web/inc/header.inc.php +++ b/data/web/inc/header.inc.php @@ -127,9 +127,9 @@ -
  • +
  • -
  • ()
  • +
  • ()
  • [ slave ]
  • diff --git a/data/web/js/build/002-bootstrap-switch.min.js b/data/web/js/build/002-bootstrap-switch.min.js deleted file mode 100644 index effcb6cb..00000000 --- a/data/web/js/build/002-bootstrap-switch.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches. - * - * @version v3.3.3 - * @homepage http://www.bootstrap-switch.org - * @author Mattia Larentis (http://larentis.eu) - * @license Apache-2.0 - */ - -'use strict';var _createClass=function(){function a(b,c){for(var e,d=0;d',{class:function _class(){var h=[];return h.push(g.options.state?'on':'off'),g.options.size&&h.push(g.options.size),g.options.disabled&&h.push('disabled'),g.options.readonly&&h.push('readonly'),g.options.indeterminate&&h.push('indeterminate'),g.options.inverse&&h.push('inverse'),g.$element.attr('id')&&h.push('id-'+g.$element.attr('id')),h.map(g._getClass.bind(g)).concat([g.options.baseClass],g._getClasses(g.options.wrapperClass)).join(' ')}}),this.$container=a('
    ',{class:this._getClass('container')}),this.$on=a('',{html:this.options.onText,class:this._getClass('handle-on')+' '+this._getClass(this.options.onColor)}),this.$off=a('',{html:this.options.offText,class:this._getClass('handle-off')+' '+this._getClass(this.options.offColor)}),this.$label=a('',{html:this.options.labelText,class:this._getClass('label')}),this.$element.on('init.bootstrapSwitch',this.options.onInit.bind(this,e)),this.$element.on('switchChange.bootstrapSwitch',function(){for(var j=arguments.length,h=Array(j),k=0;k-(f._handleWidth/2);f._dragEnd=!1,f.state(f.options.inverse?!h:h)}else f.state(!f.options.state);f._dragStart=!1}},'mouseleave.bootstrapSwitch':function mouseleaveBootstrapSwitch(){f.$label.trigger('mouseup.bootstrapSwitch')}})}},{key:'_externalLabelHandler',value:function _externalLabelHandler(){var f=this,e=this.$element.closest('label');e.on('click',function(g){g.preventDefault(),g.stopImmediatePropagation(),g.target===e[0]&&f.toggleState()})}},{key:'_formHandler',value:function _formHandler(){var e=this.$element.closest('form');e.data('bootstrap-switch')||e.on('reset.bootstrapSwitch',function(){b.setTimeout(function(){e.find('input').filter(function(){return a(this).data('bootstrap-switch')}).each(function(){return a(this).bootstrapSwitch('state',this.checked)})},1)}).data('bootstrap-switch',!0)}},{key:'_getClass',value:function _getClass(e){return this.options.baseClass+'-'+e}},{key:'_getClasses',value:function _getClasses(e){return a.isArray(e)?e.map(this._getClass.bind(this)):[this._getClass(e)]}}]),d}();a.fn.bootstrapSwitch=function(d){for(var f=arguments.length,e=Array(10&&this.options.badge&&this.$elementFilestyle.find("label").append(' '+e.length+""),this.$elementFilestyle.find(".group-span-filestyle").removeClass("input-group-btn")}}},size:function(t){if(void 0===t)return this.options.size;var e=this.$elementFilestyle.find("label"),i=this.$elementFilestyle.find("input");e.removeClass("btn-lg btn-sm"),i.removeClass("input-lg input-sm"),"nr"!=t&&(e.addClass("btn-"+t),i.addClass("input-"+t))},placeholder:function(t){if(void 0===t)return this.options.placeholder;this.options.placeholder=t,this.$elementFilestyle.find("input").attr("placeholder",t)},buttonText:function(t){if(void 0===t)return this.options.buttonText;this.options.buttonText=t,this.$elementFilestyle.find("label .buttonText").html(this.options.buttonText)},buttonName:function(t){if(void 0===t)return this.options.buttonName;this.options.buttonName=t,this.$elementFilestyle.find("label").attr({class:"btn "+this.options.buttonName})},iconName:function(t){if(void 0===t)return this.options.iconName;this.$elementFilestyle.find(".icon-span-filestyle").attr({class:"icon-span-filestyle "+this.options.iconName})},htmlIcon:function(){return this.options.icon?' ':""},htmlInput:function(){return this.options.input?' ':""},pushNameFiles:function(){var t="",e=[];void 0===this.$element[0].files?e[0]={name:this.$element[0]&&this.$element[0].value}:e=this.$element[0].files;for(var i=0;i",n=i.options.buttonBefore?l+i.htmlInput():i.htmlInput()+l,i.$elementFilestyle=t('
    '+n+"
    "),i.$elementFilestyle.find(".group-span-filestyle").attr("tabindex","0").keypress(function(t){if(13===t.keyCode||32===t.charCode)return i.$elementFilestyle.find("label").click(),!1}),i.$element.css({position:"absolute",clip:"rect(0px 0px 0px 0px)"}).attr("tabindex","-1").after(i.$elementFilestyle),(i.options.disabled||i.$element.attr("disabled"))&&i.$element.attr("disabled","true"),i.$element.change(function(){var t=i.pushNameFiles();0==i.options.input&&i.options.badge?0==i.$elementFilestyle.find(".badge").length?i.$elementFilestyle.find("label").append(' '+t.length+""):0==t.length?i.$elementFilestyle.find(".badge").remove():i.$elementFilestyle.find(".badge").html(t.length):i.$elementFilestyle.find(".badge").remove()}),window.navigator.userAgent.search(/firefox/i)>-1&&i.$elementFilestyle.find("label").click(function(){return i.$element.click(),!1})}};var n=t.fn.filestyle;t.fn.filestyle=function(e,n){var s="",l=this.each(function(){if("file"===t(this).attr("type")){var l=t(this),o=l.data("filestyle"),a=t.extend({},t.fn.filestyle.defaults,e,"object"==typeof e&&e);o||(l.data("filestyle",o=new i(this,a)),o.constructor()),"string"==typeof e&&(s=o[e](n))}});return void 0!==typeof s?s:l},t.fn.filestyle.defaults={buttonText:"Choose file",iconName:"bi bi-folder2-open",buttonName:"btn-default",size:"nr",input:!0,badge:!0,icon:!0,buttonBefore:!1,disabled:!1,placeholder:""},t.fn.filestyle.noConflict=function(){return t.fn.filestyle=n,this},t(function(){t(".filestyle").each(function(){var e=t(this),i={input:"false"!==e.attr("data-input"),icon:"false"!==e.attr("data-icon"),buttonBefore:"true"===e.attr("data-buttonBefore"),disabled:"true"===e.attr("data-disabled"),size:e.attr("data-size"),buttonText:e.attr("data-buttonText"),buttonName:e.attr("data-buttonName"),iconName:e.attr("data-iconName"),badge:"false"!==e.attr("data-badge"),placeholder:e.attr("data-placeholder")};e.filestyle(i)})})}(window.jQuery); \ No newline at end of file diff --git a/data/web/js/site/admin.js b/data/web/js/site/admin.js index 4661e86e..dd9ba83e 100644 --- a/data/web/js/site/admin.js +++ b/data/web/js/site/admin.js @@ -76,8 +76,8 @@ jQuery(function($){ {"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"}, {"sorted": true,"name":"username","title":lang.username,"style":{"width":"250px"}}, {"name":"selected_domains","title":lang.admin_domains,"breakpoints":"xs sm"}, - {"name":"tfa_active","title":"TFA", "filterable": false,"style":{"maxWidth":"80px","width":"80px"},"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, - {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"tfa_active","title":"TFA", "filterable": false,"style":{"maxWidth":"80px","width":"80px"},"formatter": function(value){return 1==value?'':0==value&&'';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"250px","width":"250px"},"type":"html","title":lang.action,"breakpoints":"xs sm"} ], "rows": $.ajax({ @@ -131,8 +131,8 @@ jQuery(function($){ "columns": [ {"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"}, {"sorted": true,"name":"usr","title":lang.username,"style":{"width":"250px"}}, - {"name":"tfa_active","title":"TFA", "filterable": false,"style":{"maxWidth":"80px","width":"80px"},"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, - {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"tfa_active","title":"TFA", "filterable": false,"style":{"maxWidth":"80px","width":"80px"},"formatter": function(value){return 1==value?'':0==value&&'';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"250px","width":"250px"},"type":"html","title":lang.action,"breakpoints":"xs sm"} ], "rows": $.ajax({ @@ -160,7 +160,7 @@ jQuery(function($){ {"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"}, {"name":"host","type":"text","title":lang.host,"style":{"width":"250px"}}, {"name":"source","title":lang.source,"breakpoints":"xs sm"}, - {"name":"keep_spam","title":lang.spamfilter, "type": "text","style":{"maxWidth":"80px","width":"80px"},"formatter": function(value){return 'yes'==value?'✕':'no'==value&&'✓';}}, + {"name":"keep_spam","title":lang.spamfilter, "type": "text","style":{"maxWidth":"80px","width":"80px"},"formatter": function(value){return 'yes'==value?'':'no'==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"180px","width":"180px"},"type":"html","title":lang.action,"breakpoints":"xs sm"} ], "rows": $.ajax({ @@ -188,7 +188,7 @@ jQuery(function($){ {"name":"hostname","type":"text","title":lang.host,"style":{"width":"250px"}}, {"name":"username","title":lang.username,"breakpoints":"xs sm"}, {"name":"used_by_domains","title":lang.in_use_by,"style":{"width":"110px"}, "type": "text","breakpoints":"xs sm"}, - {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"220px","width":"220px"},"type":"html","title":lang.action,"breakpoints":"xs sm md"} ], "rows": $.ajax({ @@ -216,7 +216,7 @@ jQuery(function($){ {"name":"destination","type":"text","title":lang.destination,"style":{"width":"250px"}}, {"name":"nexthop","type":"text","title":lang.nexthop,"style":{"width":"250px"}}, {"name":"username","title":lang.username,"breakpoints":"xs sm"}, - {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"220px","width":"220px"},"type":"html","title":lang.action,"breakpoints":"xs sm md"} ], "rows": $.ajax({ @@ -337,7 +337,7 @@ jQuery(function($){ } else if (table == 'adminstable') { $.each(data, function (i, item) { if (admin_username.toLowerCase() == item.username.toLowerCase()) { - item.usr = '→ ' + item.username; + item.usr = ' ' + item.username; } else { item.usr = item.username; } diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js index 6397bb98..ee488670 100644 --- a/data/web/js/site/mailbox.js +++ b/data/web/js/site/mailbox.js @@ -204,7 +204,7 @@ jQuery(function($){ function escapeHtml(n){return String(n).replace(/[&<>"'`=\/]/g,function(n){return entityMap[n]})} // http://stackoverflow.com/questions/46155/validate-email-address-in-javascript function humanFileSize(i){if(Math.abs(i)<1024)return i+" B";var B=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],e=-1;do{i/=1024,++e}while(Math.abs(i)>=1024&&e':new Date(i?1e3*i:0).toLocaleDateString(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})} $(".refresh_table").on('click', function(e) { e.preventDefault(); var table_name = $(this).data('table'); @@ -254,10 +254,10 @@ jQuery(function($){ {"name":"def_quota_for_mbox","title":lang.mailbox_defquota,"breakpoints":"xs sm md","style":{"width":"125px"}}, {"name":"max_quota_for_mbox","title":lang.mailbox_quota,"breakpoints":"xs sm","style":{"width":"125px"}}, {"name":"rl","title":"RL","breakpoints":"xs sm md lg","style":{"maxWidth":"100px","width":"100px"}}, - {"name":"backupmx","filterable": false,"style":{"maxWidth":"120px","width":"120px"},"title":lang.backup_mx,"breakpoints":"xs sm md lg","formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"backupmx","filterable": false,"style":{"maxWidth":"120px","width":"120px"},"title":lang.backup_mx,"breakpoints":"xs sm md lg","formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"domain_admins","title":lang.domain_admins,"style":{"word-break":"break-all","min-width":"200px"},"breakpoints":"xs sm md lg","filterable":(role == "admin"),"visible":(role == "admin")}, - {"name":"xmpp","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":"XMPP","formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, - {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"xmpp","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":"XMPP","formatter": function(value){return 1==value?'':0==value&&'';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"240px","width":"240px"},"type":"html","title":lang.action,"breakpoints":"xs sm md"} ], "rows": $.ajax({ @@ -379,7 +379,7 @@ jQuery(function($){ }, {"name":"messages","filterable": false,"title":lang.msg_num,"breakpoints":"xs sm md"}, /* {"name":"rl","title":"RL","breakpoints":"all","style":{"width":"125px"}}, */ - {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':(0==value?'✕':2==value&&'—');}}, + {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'':(0==value?'':2==value&&'—');}}, {"name":"action","filterable": false,"sortable": false,"style":{"min-width":"290px","text-align":"right"},"type":"html","title":lang.action,"breakpoints":"xs sm md"} ], "empty": lang.empty, @@ -497,7 +497,7 @@ jQuery(function($){ {"name":"kind","title":lang.kind}, {"name":"domain","title":lang.domain,"breakpoints":"xs sm"}, {"name":"multiple_bookings","filterable": false,"style":{"maxWidth":"150px","width":"140px"},"title":lang.multiple_bookings,"breakpoints":"xs sm"}, - {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"180px","width":"180px"},"type":"html","title":lang.action,"breakpoints":"xs sm"} ], "empty": lang.empty, @@ -570,7 +570,7 @@ jQuery(function($){ {"name":"local_dest","title":lang.bcc_local_dest}, {"name":"bcc_dest","title":lang.bcc_destinations}, {"name":"domain","title":lang.domain,"breakpoints":"xs sm"}, - {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"180px","width":"180px"},"type":"html","title":lang.action,"breakpoints":"xs sm"} ], "empty": lang.empty, @@ -637,7 +637,7 @@ jQuery(function($){ {"sorted": true,"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}}, {"name":"recipient_map_old","title":lang.recipient_map_old}, {"name":"recipient_map_new","title":lang.recipient_map_new}, - {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"180px","width":"180px"},"type":"html","title":(role == "admin" ? lang.action : ""),"breakpoints":"xs sm"} ], "empty": lang.empty, @@ -702,7 +702,7 @@ jQuery(function($){ {"name":"dest","title":lang.tls_map_dest}, {"name":"policy","title":lang.tls_map_policy}, {"name":"parameters","title":lang.tls_map_parameters}, - {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"180px","width":"180px"},"type":"html","title":(role == "admin" ? lang.action : ""),"breakpoints":"xs sm"} ], "empty": lang.empty, @@ -774,8 +774,8 @@ jQuery(function($){ {"name":"domain","title":lang.domain,"breakpoints":"xs sm"}, {"name":"public_comment","title":lang.public_comment,"breakpoints":"all"}, {"name":"private_comment","title":lang.private_comment,"breakpoints":"all"}, - {"name":"sogo_visible","title":lang.sogo_visible,"formatter": function(value){return 1==value?'✓':0==value&&'✕';},"breakpoints":"all"}, - {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"sogo_visible","title":lang.sogo_visible,"formatter": function(value){return 1==value?'':0==value&&'';},"breakpoints":"all"}, + {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"180px","width":"180px"},"type":"html","title":lang.action,"breakpoints":"xs sm"} ], "empty": lang.empty, @@ -869,7 +869,7 @@ jQuery(function($){ {"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"}, {"sorted": true,"name":"alias_domain","title":lang.alias,"style":{"width":"250px"}}, {"name":"target_domain","title":lang.target_domain,"type":"html"}, - {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"250px","width":"250px"},"type":"html","title":lang.action,"breakpoints":"xs sm"} ], "empty": lang.empty, @@ -940,7 +940,7 @@ jQuery(function($){ {"name":"mins_interval","title":lang.mins_interval,"breakpoints":"all"}, {"name":"last_run","title":lang.last_run,"breakpoints":"xs sm md"}, {"name":"log","title":"Log"}, - {"name":"active","filterable": false,"style":{"maxWidth":"70px","width":"70px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"70px","width":"70px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"is_running","filterable": false,"style":{"maxWidth":"120px","width":"100px"},"title":lang.status}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"180px","width":"180px"},"type":"html","title":lang.action,"breakpoints":"xs sm"} ], diff --git a/data/web/js/site/user.js b/data/web/js/site/user.js index 45f02dbe..856e8a5d 100644 --- a/data/web/js/site/user.js +++ b/data/web/js/site/user.js @@ -130,7 +130,7 @@ jQuery(function($){ {"name":"mins_interval","title":lang.interval + " (min)","breakpoints":"all"}, {"name":"last_run","title":lang.last_run,"breakpoints":"all"}, {"name":"log","title":"Log"}, - {"name":"active","filterable": false,"style":{"maxWidth":"70px","width":"70px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"70px","width":"70px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"is_running","filterable": false,"style":{"maxWidth":"120px","width":"100px"},"title":lang.status}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"240px","width":"240px"},"type":"html","title":lang.action,"breakpoints":"xs sm"} ], @@ -192,7 +192,7 @@ jQuery(function($){ {"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px","text-align":"center"},"filterable": false,"sortable": false,"type":"html"}, {"sorted": true,"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}}, {"name":"name","title":lang.app_name}, - {"name":"active","filterable": false,"style":{"maxWidth":"70px","width":"70px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}}, + {"name":"active","filterable": false,"style":{"maxWidth":"70px","width":"70px"},"title":lang.active,"formatter": function(value){return 1==value?'':0==value&&'';}}, {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"180px","width":"180px"},"type":"html","title":lang.action,"breakpoints":"xs sm"} ], "empty": lang.empty, diff --git a/data/web/json_api.php b/data/web/json_api.php index 7e842754..a1198f2f 100644 --- a/data/web/json_api.php +++ b/data/web/json_api.php @@ -319,8 +319,14 @@ if (isset($_GET['query'])) { } break; case "get": - function process_get_return($data) { - echo (!isset($data) || empty($data)) ? '{}' : json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); + function process_get_return($data, $object = true) { + if ($object === true) { + $ret_str = '{}'; + } + else { + $ret_str = '[]'; + } + echo (!isset($data) || empty($data)) ? $ret_str : json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); } // only allow GET requests to GET API endpoints if ($_SERVER['REQUEST_METHOD'] != 'GET') { @@ -1169,10 +1175,10 @@ if (isset($_GET['query'])) { // "all" will not print details switch ($object) { case "all": - process_get_return(quarantine('get')); + process_get_return(quarantine('get'), false); break; default: - process_get_return(quarantine('details', $object)); + process_get_return(quarantine('details', $object), false); break; } break; @@ -1608,6 +1614,9 @@ if (isset($_GET['query'])) { case "quota_notification": process_edit_return(quota_notification('edit', $attr)); break; + case "quota_notification_bcc": + process_edit_return(quota_notification_bcc('edit', $attr)); + break; case "mailq": process_edit_return(mailq('edit', array_merge(array('qid' => $items), $attr))); break; diff --git a/data/web/lang/lang.de.json b/data/web/lang/lang.de.json index 00e983ee..f3785cbe 100644 --- a/data/web/lang/lang.de.json +++ b/data/web/lang/lang.de.json @@ -580,6 +580,7 @@ "pushover_verify": "Verbindung verifizieren", "quota_mb": "Speicherplatz (MiB)", "quota_warning_bcc": "Quota-Warnung BCC", + "quota_warning_bcc_info": "Die Warnungen werden als separate Kopie an die nachstehenden Empfänger versendet. Dem Betreff wird der jeweilige Benutzername in Klammern (etwa Quota-Warnung (user@example.com)) angehangen.", "ratelimit": "Rate Limit", "redirect_uri": "Redirect/Callback-URL", "relay_all": "Alle Empfänger-Adressen relayen", @@ -608,7 +609,7 @@ "spam_score": "Einen benutzerdefiniterten Spam-Score festlegen", "subfolder2": "Ziel-Ordner
    (leer = kein Unterordner)", "syncjob": "Sync-Job bearbeiten", - "target_address": "Ziel-Adresse(n) (getrennt durch Komma)", + "target_address": "Ziel-Adresse(n)", "target_domain": "Ziel-Domain", "timeout1": "Timeout für Verbindung zum Remote-Host", "timeout2": "Timeout für Verbindung zum lokalen Host", diff --git a/data/web/lang/lang.en.json b/data/web/lang/lang.en.json index 40aac1f6..08ce6fe8 100644 --- a/data/web/lang/lang.en.json +++ b/data/web/lang/lang.en.json @@ -578,6 +578,7 @@ "pushover_verify": "Verify credentials", "quota_mb": "Quota (MiB)", "quota_warning_bcc": "Quota warning BCC", + "quota_warning_bcc_info": "Warnings will be sent as separate copies to the following recipients. The subject will be suffixed by the corresponding username in brackets, for example: Quota warning (user@example.com).", "ratelimit": "Rate limit", "redirect_uri": "Redirect/Callback URL", "relay_all": "Relay all recipients",