mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-03 12:28:51 +00:00
@@ -60,7 +60,7 @@ static const NSString *SPECIAL_SYMBOL_ALLOWED = @"%$&*(){}!?\\@#.,:;+=";
|
||||
return [NSArray arrayWithObjects: [NSString stringWithFormat:@"(.*[a-z].*){%i}", [count intValue]],
|
||||
[NSString stringWithFormat:@"(.*[A-Z].*){%i}", [count intValue]],
|
||||
[NSString stringWithFormat:@"(.*[0-9].*){%i}", [count intValue]],
|
||||
[NSString stringWithFormat:@"([%%%@].*){%i,}", SPECIAL_SYMBOL_ALLOWED, [count intValue]],
|
||||
[NSString stringWithFormat:@"([%@].*){%i,}", SPECIAL_SYMBOL_ALLOWED, [count intValue]],
|
||||
[NSString stringWithFormat:@".{%i,}", [count intValue]],
|
||||
nil];
|
||||
}
|
||||
@@ -99,25 +99,17 @@ static const NSString *SPECIAL_SYMBOL_ALLOWED = @"%$&*(){}!?\\@#.,:;+=";
|
||||
if ([[self policies] containsObject: label]) {
|
||||
NSNumber *value = [policy objectForKey:@"value"];
|
||||
if (0 < value) {
|
||||
if (![POLICY_MIN_SPECIAL_SYMBOLS isEqualToString: label]) {
|
||||
NSString *newLabel = [[translations objectForKey: label]
|
||||
stringByReplacingOccurrencesOfString: @"%{0}"
|
||||
withString: [value stringValue]];
|
||||
[userTranslatedPasswordPolicy addObject:[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
newLabel, @"label",
|
||||
[policy objectForKey:@"regex"], @"regex",
|
||||
nil]];
|
||||
} else {
|
||||
NSString *newLabel = [[[[translations objectForKey: label]
|
||||
stringByReplacingOccurrencesOfString: @"%{0}"
|
||||
withString: [value stringValue]]
|
||||
stringByAppendingString: @" "]
|
||||
stringByAppendingString: SPECIAL_SYMBOL_ALLOWED];
|
||||
[userTranslatedPasswordPolicy addObject:[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
newLabel, @"label",
|
||||
[policy objectForKey:@"regex"], @"regex",
|
||||
nil]];
|
||||
NSString *newLabel = [[translations objectForKey: label]
|
||||
stringByReplacingOccurrencesOfString: @"%{0}"
|
||||
withString: [value stringValue]];
|
||||
if ([POLICY_MIN_SPECIAL_SYMBOLS isEqualToString: label]) {
|
||||
newLabel = [[newLabel stringByAppendingString: @" "]
|
||||
stringByAppendingString: SPECIAL_SYMBOL_ALLOWED];
|
||||
}
|
||||
[userTranslatedPasswordPolicy addObject:[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
newLabel, @"label",
|
||||
[policy objectForKey:@"regex"], @"regex",
|
||||
nil]];
|
||||
} else {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
"POLICY_MIN_LOWERCASE_LETTER" = "Minimum of %{0} lowercase letter";
|
||||
"POLICY_MIN_UPPERCASE_LETTER" = "Minimum of %{0} uppercase letter";
|
||||
"POLICY_MIN_DIGIT" = "Minimum of %{0} digit";
|
||||
"POLICY_MIN_SPECIAL_SYMBOLS" = "Minimum of %{0}special symbols";
|
||||
"POLICY_MIN_SPECIAL_SYMBOLS" = "Minimum of %{0} special symbols";
|
||||
"POLICY_MIN_LENGTH" = "Minimum length of %{0} characters";
|
||||
|
||||
|
||||
|
||||
@@ -565,7 +565,7 @@ vtodo_class2 = "(Confidential task)";
|
||||
"CalDAV URL" = "CalDAV URL ";
|
||||
"WebDAV ICS URL" = "WebDAV ICS URL";
|
||||
"WebDAV XML URL" = "WebDAV XML URL";
|
||||
"Clipboard" = "Copy to clipboard";
|
||||
"Copy to clipboard" = "Copy to clipboard";
|
||||
|
||||
/* Error messages */
|
||||
"dayFieldInvalid" = "Please specify a numerical value in the Days field greater or equal to 1.";
|
||||
|
||||
@@ -565,6 +565,7 @@ vtodo_class2 = "(Tâche confidentielle)";
|
||||
"CalDAV URL" = "Accès en CalDAV ";
|
||||
"WebDAV ICS URL" = "Représentation ICS en WebDAV";
|
||||
"WebDAV XML URL" = "Représentation XML en WebDAV";
|
||||
"Copy to clipboard" = "Copier dans le presse-papier";
|
||||
|
||||
/* Error messages */
|
||||
"dayFieldInvalid" = "Veuillez spécifier un chiffre supérieur ou égal à 1 dans le champ Jours.";
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<label><var:string label:value="CalDAV URL"/></label>
|
||||
<input id="user-caldav-url" type="text" ng-model="::links.calendar.urls.calDavURL" ng-readonly="true"/>
|
||||
<md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('user-caldav-url')">
|
||||
<md-tooltip><var:string label:value="Clipboard"/></md-tooltip>
|
||||
<md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
|
||||
<md-icon label:aria-label="Copy Icon">content_copy</md-icon>
|
||||
</md-button>
|
||||
</md-input-container>
|
||||
@@ -47,7 +47,7 @@
|
||||
<label><var:string label:value="WebDAV ICS URL"/></label>
|
||||
<input id="user-webdav-ics-url" type="text" ng-model="::links.calendar.urls.webDavICSURL" ng-readonly="true"/>
|
||||
<md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('user-webdav-ics-url')">
|
||||
<md-tooltip><var:string label:value="Clipboard"/></md-tooltip>
|
||||
<md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
|
||||
<md-icon label:aria-label="Content_copy">content_copy</md-icon>
|
||||
</md-button>
|
||||
</md-input-container>
|
||||
@@ -55,7 +55,7 @@
|
||||
<label><var:string label:value="WebDAV XML URL"/></label>
|
||||
<input id="user-webdav-xml-url" type="text" ng-model="::links.calendar.urls.webDavXMLURL" ng-readonly="true"/>
|
||||
<md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('user-webdav-xml-url')">
|
||||
<md-tooltip><var:string label:value="Clipboard"/></md-tooltip>
|
||||
<md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
|
||||
<md-icon label:aria-label="Content_copy">content_copy</md-icon>
|
||||
</md-button>
|
||||
</md-input-container>
|
||||
@@ -68,7 +68,7 @@
|
||||
<label><var:string label:value="CalDAV URL"/></label>
|
||||
<input id="public-caldav-url" type="text" ng-model="::links.calendar.urls.publicCalDavURL" ng-readonly="true"/>
|
||||
<md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('public-caldav-url')">
|
||||
<md-tooltip><var:string label:value="Clipboard"/></md-tooltip>
|
||||
<md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
|
||||
<md-icon label:aria-label="Content_copy">content_copy</md-icon>
|
||||
</md-button>
|
||||
</md-input-container>
|
||||
@@ -76,7 +76,7 @@
|
||||
<label><var:string label:value="WebDAV ICS URL"/></label>
|
||||
<input id="public-webdav-ics-url" type="text" ng-model="::links.calendar.urls.publicWebDavICSURL" ng-readonly="true"/>
|
||||
<md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('public-webdav-ics-url')">
|
||||
<md-tooltip><var:string label:value="Clipboard"/></md-tooltip>
|
||||
<md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
|
||||
<md-icon label:aria-label="Content_copy">content_copy</md-icon>
|
||||
</md-button>
|
||||
</md-input-container>
|
||||
@@ -84,7 +84,7 @@
|
||||
<label><var:string label:value="WebDAV XML URL"/></label>
|
||||
<input id="public-webdav-xml-url" type="text" ng-model="::links.calendar.urls.publicWebDavXMLURL" ng-readonly="true"/>
|
||||
<md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('public-webdav-xml-url')">
|
||||
<md-tooltip><var:string label:value="Clipboard"/></md-tooltip>
|
||||
<md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
|
||||
<md-icon label:aria-label="Content_copy">content_copy</md-icon>
|
||||
</md-button>
|
||||
</md-input-container>
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
}
|
||||
|
||||
function clipboard(elem_id) {
|
||||
let linkUrl = document.getElementById(elem_id);
|
||||
var linkUrl = document.getElementById(elem_id);
|
||||
navigator.clipboard.writeText(linkUrl.value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user