diff --git a/Documentation/SOGoInstallationGuide.asciidoc b/Documentation/SOGoInstallationGuide.asciidoc index ba1da0c9b..0e373f4f3 100644 --- a/Documentation/SOGoInstallationGuide.asciidoc +++ b/Documentation/SOGoInstallationGuide.asciidoc @@ -815,6 +815,8 @@ Obiously, if your users can connect without specifying a domain, let this parame |S |SOGoDomainAllowed |Parameter used to define which domains SOGo should allowed during a connection request. This parameter is an array of strings. +|S |SOGoURLCreateAccount +|Add a link below the login form and set the link using the value of this setting. |S |SOGoPasswordRecoveryEnabled |Boolean enable password recovery with secret question or secondary e-mail. Default value is `NO`. diff --git a/SoObjects/SOGo/SOGoSystemDefaults.h b/SoObjects/SOGo/SOGoSystemDefaults.h index 9df14a873..e3e2c8d2c 100644 --- a/SoObjects/SOGo/SOGoSystemDefaults.h +++ b/SoObjects/SOGo/SOGoSystemDefaults.h @@ -140,6 +140,8 @@ NSComparisonResult languageSort(id el1, id el2, void *context); - (BOOL)isURLEncryptionEnabled; - (NSString *)urlEncryptionPassphrase; +- (NSString *)urlCreateAccount; + @end #endif /* SOGOSYSTEMDEFAULTS_H */ diff --git a/SoObjects/SOGo/SOGoSystemDefaults.m b/SoObjects/SOGo/SOGoSystemDefaults.m index 03149bab9..61c299245 100644 --- a/SoObjects/SOGo/SOGoSystemDefaults.m +++ b/SoObjects/SOGo/SOGoSystemDefaults.m @@ -928,4 +928,9 @@ NSComparisonResult languageSort(id el1, id el2, void *context) return disableExport; } +- (NSString *)urlCreateAccount +{ + return [self stringForKey: @"SOGoURLCreateAccount"]; +} + @end diff --git a/UI/MainUI/English.lproj/Localizable.strings b/UI/MainUI/English.lproj/Localizable.strings index 8993df208..35e15939f 100644 --- a/UI/MainUI/English.lproj/Localizable.strings +++ b/UI/MainUI/English.lproj/Localizable.strings @@ -6,6 +6,7 @@ "Domain" = "Domain"; "Remember username" = "Remember username"; "Connect" = "Connect"; +"Create an account" = "Create an account"; /* Appears while authentication is in progress */ "Authenticating" = "Authenticating"; diff --git a/UI/MainUI/French.lproj/Localizable.strings b/UI/MainUI/French.lproj/Localizable.strings index 92b899a3e..7b6f0b535 100644 --- a/UI/MainUI/French.lproj/Localizable.strings +++ b/UI/MainUI/French.lproj/Localizable.strings @@ -6,6 +6,7 @@ "Domain" = "Domaine"; "Remember username" = "Se souvenir de moi"; "Connect" = "Connexion"; +"Create an account" = "Créer un compte"; /* Appears while authentication is in progress */ "Authenticating" = "Authentification en cours"; diff --git a/UI/MainUI/SOGoRootPage.m b/UI/MainUI/SOGoRootPage.m index afa686586..a0206e47b 100644 --- a/UI/MainUI/SOGoRootPage.m +++ b/UI/MainUI/SOGoRootPage.m @@ -1060,4 +1060,16 @@ static const NSString *kJwtKey = @"jwt"; return [[SOGoAdmin sharedInstance] getMotd] && [[[SOGoAdmin sharedInstance] getMotd] length] > 1; } +- (BOOL) hasUrlCreateAccount +{ + return ([[SOGoSystemDefaults sharedSystemDefaults] + urlCreateAccount] != nil); +} + +- (NSString *) urlCreateAccount +{ + return [[SOGoSystemDefaults sharedSystemDefaults] + urlCreateAccount]; +} + @end /* SOGoRootPage */ diff --git a/UI/Templates/MainUI/SOGoRootPage.wox b/UI/Templates/MainUI/SOGoRootPage.wox index 0930be948..5a0c1adb0 100644 --- a/UI/Templates/MainUI/SOGoRootPage.wox +++ b/UI/Templates/MainUI/SOGoRootPage.wox @@ -106,6 +106,11 @@ + +
+ +
+
diff --git a/UI/WebServerResources/scss/views/LoginUI.scss b/UI/WebServerResources/scss/views/LoginUI.scss index 71487727d..743025c87 100644 --- a/UI/WebServerResources/scss/views/LoginUI.scss +++ b/UI/WebServerResources/scss/views/LoginUI.scss @@ -50,6 +50,13 @@ $sg-login-width: grid-step(5); margin-bottom: 8px; } + .create-account-link { + color: rgb(255, 255, 255); + font-size: 1em; + text-decoration: none; + margin-bottom: 5px; + } + .password-lost-link { color: rgb(255, 255, 255); font-size: 0.9em;