(fix) don't offer forward/vacation options in filters if not enabled
parent
187cd5e4ae
commit
eff8ab3e0e
1
NEWS
1
NEWS
|
@ -4,6 +4,7 @@
|
||||||
Enhancements
|
Enhancements
|
||||||
- [web] added Junk handling feature from v2
|
- [web] added Junk handling feature from v2
|
||||||
- [web] updated Material Icons font to version 2.1.3
|
- [web] updated Material Icons font to version 2.1.3
|
||||||
|
- [web] don't offer forward/vacation options in filters if not enabled
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
- [web] handle birthday dates before 1970
|
- [web] handle birthday dates before 1970
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* UIxPreferences.h - this file is part of SOGo
|
/* UIxPreferences.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2015 Inverse inc.
|
* Copyright (C) 2007-2016 Inverse inc.
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -51,12 +51,10 @@
|
||||||
NSMutableDictionary *vacationOptions, *forwardOptions;
|
NSMutableDictionary *vacationOptions, *forwardOptions;
|
||||||
|
|
||||||
BOOL mailCustomFromEnabled;
|
BOOL mailCustomFromEnabled;
|
||||||
|
BOOL forwardEnabled;
|
||||||
BOOL hasChanged;
|
BOOL hasChanged;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//- (NSString *) userLongDateFormat;
|
|
||||||
- (BOOL) _isSieveServerAvailable;
|
- (BOOL) _isSieveServerAvailable;
|
||||||
- (id) _sieveClient;
|
- (id) _sieveClient;
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,7 @@ static NSArray *reminderValues = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
mailCustomFromEnabled = [dd mailCustomFromEnabled];
|
mailCustomFromEnabled = [dd mailCustomFromEnabled];
|
||||||
|
forwardEnabled = [dd forwardEnabled];
|
||||||
|
|
||||||
hasChanged = NO;
|
hasChanged = NO;
|
||||||
}
|
}
|
||||||
|
@ -2079,6 +2080,11 @@ static NSArray *reminderValues = nil;
|
||||||
return (mailCustomFromEnabled ? @"true" : @"false");
|
return (mailCustomFromEnabled ? @"true" : @"false");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *) forwardEnabled
|
||||||
|
{
|
||||||
|
return (forwardEnabled ? @"true" : @"false");
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var mailCustomFromEnabled = <var:string value="mailCustomFromEnabled" const:escapeHTML="NO"/>;
|
var mailCustomFromEnabled = <var:string value="mailCustomFromEnabled" const:escapeHTML="NO"/>;
|
||||||
|
var forwardEnabled = <var:string value="forwardEnabled" const:escapeHTML="NO"/>;
|
||||||
|
var vacationEnabled = <var:string value="isVacationEnabled" const:escapeHTML="NO"/>;
|
||||||
var timeZonesList = <var:string value="timeZonesList" const:escapeHTML="NO"/>;
|
var timeZonesList = <var:string value="timeZonesList" const:escapeHTML="NO"/>;
|
||||||
var defaultEmailAddresses = '<var:string value="defaultEmailAddresses" const:escapeHTML="NO"/>';
|
var defaultEmailAddresses = '<var:string value="defaultEmailAddresses" const:escapeHTML="NO"/>';
|
||||||
var forwardConstraints = <var:string value="forwardConstraints" const:escapeHTML="NO"/>;
|
var forwardConstraints = <var:string value="forwardConstraints" const:escapeHTML="NO"/>;
|
||||||
|
|
|
@ -9,7 +9,10 @@
|
||||||
*/
|
*/
|
||||||
FiltersDialogController.$inject = ['$scope', '$window', '$mdDialog', 'filter', 'mailboxes', 'labels'];
|
FiltersDialogController.$inject = ['$scope', '$window', '$mdDialog', 'filter', 'mailboxes', 'labels'];
|
||||||
function FiltersDialogController($scope, $window, $mdDialog, filter, mailboxes, labels) {
|
function FiltersDialogController($scope, $window, $mdDialog, filter, mailboxes, labels) {
|
||||||
var vm = this, sieveCapabilities = $window.sieveCapabilities;
|
var vm = this,
|
||||||
|
sieveCapabilities = $window.sieveCapabilities,
|
||||||
|
forwardEnabled = $window.forwardEnabled,
|
||||||
|
vacationEnabled = $window.vacationEnabled;
|
||||||
|
|
||||||
vm.filter = filter;
|
vm.filter = filter;
|
||||||
vm.mailboxes = mailboxes;
|
vm.mailboxes = mailboxes;
|
||||||
|
@ -37,11 +40,15 @@
|
||||||
vm.methodLabels = {
|
vm.methodLabels = {
|
||||||
"discard": l("Discard the message"),
|
"discard": l("Discard the message"),
|
||||||
"keep": l("Keep the message"),
|
"keep": l("Keep the message"),
|
||||||
"redirect": l("Forward the message to"),
|
|
||||||
"vacation": l("Send a vacation message"),
|
|
||||||
"stop": l("Stop processing filter rules")
|
"stop": l("Stop processing filter rules")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (forwardEnabled)
|
||||||
|
vm.methodLabels.redirect = l("Forward the message to");
|
||||||
|
|
||||||
|
if (vacationEnabled)
|
||||||
|
vm.methodLabels.vacation = l("Send a vacation message");
|
||||||
|
|
||||||
if (sieveCapabilities.indexOf("reject") > -1)
|
if (sieveCapabilities.indexOf("reject") > -1)
|
||||||
vm.methodLabels.reject = l("Send a reject message");
|
vm.methodLabels.reject = l("Send a reject message");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue