diff --git a/README.md b/README.md index 1378930d799e1d5b2c76598cb946d18810823b93..608c14dec85df802f7d1a4bd7a97975eb163eaa2 100644 --- a/README.md +++ b/README.md @@ -136,3 +136,10 @@ The values should be set as follows: - `oidc_admin_password` (password of admin account) - `oidc_login_provider_url` (provider URL: see also https://github.com/pulsejet/nextcloud-oidc-login) - `oidc_admin_sync_2fa` -> (set to boolean value true to enable sync; defaults to false) + +## Newsletter signup configuration: + +- `occ config:system:set newsletter_base_url --value='https://abcd'`: should be set to the newsletter API's base url +- `occ config:system:set newsletter_list_ids eos --value=1234`: should be set to the list ID for the eOS newsletter +- `occ config:system:set newsletter_list_ids product --value=1234 --type=integer` should be set to the list ID for the shop newsletter +- `occ config:system:set newsletter_list_ids b2b --value=1234 --type=integer` should be set to the list ID for the B2B newsletter diff --git a/l10n/de.js b/l10n/de.js index 6921720ba1d6b8bdeec5993f868d48108421102a..061616ecc61f1ef0f15d02e34a4c5cdce8811209 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -84,6 +84,7 @@ OC.L10N.register( "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Wenn Sie eine Nachricht sehen, die besagt \"Google hasn't verified this app\", können Sie diese ignorieren, indem Sie auf \"Advanced\" klicken. Wir arbeiten derzeit daran, die erforderliche Zertifizierung von Google zu erhalten, um diese Nachricht zu entfernen.", "Username is too large.": "Der Benutzername ist zu groß.", "Display name is too large.": "Der Anzeigename ist zu groß.", - "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen." + "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen.", + "I want to stay informed about Murena for business offers.": "Ich möchte Informationen über Murenas Angebote erhalten." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index 438832fac776d3177427b56cb8d0b2915df4fe1a..9c322e1143a60ad288cb23968dbebf6a7fde6097 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -82,7 +82,8 @@ "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Wenn Sie eine Nachricht sehen, die besagt \"Google hasn't verified this app\", können Sie diese ignorieren, indem Sie auf \"Advanced\" tippen. Wir arbeiten derzeit daran, die erforderliche Zertifizierung von Google zu erhalten, um diese Fehlermeldung zu beseitigen.", "Username is too large.": "Der Benutzername ist zu groß.", "Display name is too large.": "Der Anzeigename ist zu groß.", - "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen." + "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen.", + "I want to stay informed about Murena for business offers.": "Ich möchte Informationen über Murenas Angebote erhalten." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/de_DE.js b/l10n/de_DE.js index 4003ede0e3651e086eb4d3a72e20b9da7c3b8f59..02506c4c42ffeb885051f437a44191ae1e3e6118 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -84,6 +84,7 @@ OC.L10N.register( "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Wenn du eine Nachricht siehst, die besagt \"Google hasn't verified this app\", kannst du sie ignorieren, indem du auf \"Advanced\" klickst. Wir arbeiten derzeit daran, die erforderliche Zertifizierung von Google zu erhalten, um diese Nachricht zu entfernen.", "Username is too large.": "Der Benutzername ist zu groß.", "Display name is too large.": "Der Anzeigename ist zu groß.", - "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen." + "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen.", + "I want to stay informed about Murena for business offers.": "Ich möchte Informationen über Murenas Angebote erhalten." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 2a8864042c05ffefcf4b51d814b269dc75e7d746..62ce0c0f4e71ed010b8edf5f358f825872ddd49d 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -82,7 +82,8 @@ "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Wenn du eine Nachricht siehst, die besagt \"Google hasn't verified this app\", kannst du sie ignorieren, indem du auf \"Advanced\" tippst. Wir arbeiten derzeit daran, die erforderliche Zertifizierung von Google zu erhalten, um diese Fehlermeldung zu beseitigen.", "Username is too large.": "Der Benutzername ist zu groß.", "Display name is too large.": "Der Anzeigename ist zu groß.", - "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen." + "Password has invalid characters.": "Das Passwort enthält ungültige Zeichen.", + "I want to stay informed about Murena for business offers.": "Ich möchte Informationen über Murenas Angebote erhalten." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/en.js b/l10n/en.js index b89f08a5c1271246718e08b8b9b1c85b3d023d51..c277c8a50734f13f8d5f094685d53cf54ee51eb8 100644 --- a/l10n/en.js +++ b/l10n/en.js @@ -87,6 +87,7 @@ OC.L10N.register( "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.", "Username is too large.": "Username is too large.", "Display name is too large.": "Display name is too large.", - "Password has invalid characters.": "Password has invalid characters." + "Password has invalid characters.": "Password has invalid characters.", + "I want to stay informed about Murena for business offers.": "I want to stay informed about Murena for business offers." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/en.json b/l10n/en.json index 68c5c205684fdc617345c80a790ee6549a98e7a6..e75f05425c4eb05f20f2c6b100c0f406db4ad584 100644 --- a/l10n/en.json +++ b/l10n/en.json @@ -84,7 +84,8 @@ "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.", "Username is too large.": "Username is too large.", "Display name is too large.": "Display name is too large.", - "Password has invalid characters.": "La contraseña tiene caracteres no válidos." + "Password has invalid characters.": "La contraseña tiene caracteres no válidos.", + "I want to stay informed about Murena for business offers.": "I want to stay informed about Murena for business offers." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/es.js b/l10n/es.js index 8f2b5a9b8a1c3aaf00e90be81e8042e7f0040d71..492bf246b263b5ae8d3b3a2ddb6f291e9f2c3375 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -86,6 +86,7 @@ OC.L10N.register( "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Si ves un mensaje que dice \"Google hasn't verified this app\", puedes omitirlo haciendo clic en \"Advanced\". Actualmente estamos trabajando para obtener la certificación que Google exige para eliminar este mensaje.", "Username is too large.": "El nombre de usuario es demasiado grande.", "Display name is too large.": "El nombre para mostrar es demasiado grande.", - "Password has invalid characters.": "La contraseña tiene caracteres no válidos." + "Password has invalid characters.": "La contraseña tiene caracteres no válidos.", + "I want to stay informed about Murena for business offers.": "Deseo permanecer informado sobre las ofertas de Murena para empresas." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index 1bb56969e611effabaf49a5368d54034d4576a5c..0d68ec1b52e4cf2c987ee8b2cc86de39ed24784b 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -85,8 +85,8 @@ "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Si ves un mensaje que dice \"Google hasn't verified this app\", puedes omitirlo haciendo clic en \"Advanced\". Actualmente estamos trabajando para obtener la certificación que Google exige para eliminar este mensaje.", "Username is too large.": "El nombre de usuario es demasiado grande.", "Display name is too large.": "El nombre para mostrar es demasiado grande.", - "Password has invalid characters.": "Password has invalid characters." - + "Password has invalid characters.": "Password has invalid characters.", + "I want to stay informed about Murena for business offers.": "Deseo permanecer informado sobre las ofertas de Murena para empresas." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/fr.js b/l10n/fr.js index e4276c0977339f536f67443ee2211e94e0c1ab45..0fb559f6d49789c69fa12bfbe52825c6cae00a00 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -85,6 +85,7 @@ OC.L10N.register( "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Si vous voyez un message disant \"Google hasn't verified this app\" vous pouvez le contourner en cliquant sur \"Advanced\". Nous travaillons actuellement sur l'obtention de la certification exigée par Google pour se débarrasser de ce message.", "Username is too large.": "Le nom d'utilisateur est trop grand.", "Display name is too large.": "Le nom affiché est trop grand.", - "Password has invalid characters.": "Le mot de passe contient des caractères non valides." + "Password has invalid characters.": "Le mot de passe contient des caractères non valides.", + "I want to stay informed about Murena for business offers.": "Je souhaite rester informé·e des offres Murena pour les entreprises." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index fd493f69e141385034027fb2bb675aaa399890d3..09221b139fddf622f3e7ec4413c1cfe959e3c1c2 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -84,7 +84,8 @@ "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Si vous voyez un message disant \"Google hasn't verified this app\" vous pouvez le contourner en cliquant sur \"Advanced\". Nous travaillons actuellement sur l'obtention de la certification exigée par Google pour se débarrasser de ce message.", "Username is too large.": "Le nom d'utilisateur est trop grand.", "Display name is too large.": "Le nom affiché est trop grand.", - "Password has invalid characters.": "Le mot de passe contient des caractères non valides." + "Password has invalid characters.": "Le mot de passe contient des caractères non valides.", + "I want to stay informed about Murena for business offers.": "Je souhaite rester informé·e des offres Murena pour les entreprises." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/l10n/it.js b/l10n/it.js index 48635b8aab0e36d4e55a6267b36ec791ec4af8d1..a7630b904375272f5e30abf35c86bb59d7ad0178 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -85,6 +85,7 @@ OC.L10N.register( "If you see a \"Google hasn't verified this app\" message you can bypass it by clicking \"Advanced\". We're currently working on passing the certification Google demands to get rid of this message.":"Se vedi un messaggio che dice \"Google hasn't verified this app\", puoi ignorarlo facendo clic su \"Advanced\". Attualmente stiamo lavorando per ottenere la certificazione richiesta da Google per eliminare questo messaggio.", "Username is too large.": "Il nome utente è troppo grande.", "Display name is too large.": "Il nome del display è troppo grande.", - "Password has invalid characters.": "La password contiene caratteri non validi." + "Password has invalid characters.": "La password contiene caratteri non validi.", + "I want to stay informed about Murena for business offers.": "Desidero ricevere informazioni sulle offerte commerciali di Murena." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/it.json b/l10n/it.json index a69f0ba0fe1e8c0a6b61c88fd0c3a086eb1a1291..d7152c44f2ef4213d0614ca9ed5d309f32f0aea9 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -81,7 +81,8 @@ "Username is too large.": "Il nome utente è troppo grande.", "Display name is too large.": "Il nome del display è troppo grande.", "Password has invalid characters.": "La password contiene caratteri non validi.", - "I have read and accept the Terms of Service.": "Ho letto e accetto i Termini di servizio." + "I have read and accept the Terms of Service.": "Ho letto e accetto i Termini di servizio.", + "I want to stay informed about Murena for business offers.": "Desidero ricevere informazioni sulle offerte commerciali di Murena." }, "pluralForm": "nplurals=2; plural=(n != 1);" } diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php index b9e0d16b38a64e1db4195aecabe2906a50847d0e..54d316accefa021974cf781b6bd63f5a05c68f69 100644 --- a/lib/Controller/AccountController.php +++ b/lib/Controller/AccountController.php @@ -143,7 +143,7 @@ class AccountController extends Controller { * * @return \OCP\AppFramework\Http\DataResponse */ - public function create(string $recoveryEmail, string $password = '', string $language = 'en', bool $newsletterEos = false, bool $newsletterProduct = false): DataResponse { + public function create(string $recoveryEmail, string $password = '', string $language = 'en', bool $newsletterEos = false, bool $newsletterProduct = false, bool $newsletterB2B = false): DataResponse { $response = new DataResponse(); @@ -206,7 +206,7 @@ class AccountController extends Controller { $this->userService->createNewDomainAlias($username, $userEmail); $this->userService->setTOS($username, true); $this->userService->setUserLanguage($username, $language); - $this->newsletterService->setNewsletterSignup($newsletterEos, $newsletterProduct, $userEmail, $language); + $this->newsletterService->setNewsletterSignup($newsletterEos, $newsletterProduct, $newsletterB2B, $userEmail, $language); $this->userService->setRecoveryEmail($username, ''); if($recoveryEmail !== '') { $this->userService->setUnverifiedRecoveryEmail($username, $recoveryEmail); diff --git a/lib/Service/NewsLetterService.php b/lib/Service/NewsLetterService.php index 3aca33a658e376956b583f615b3263ca59062f80..4fb41ebd49b5a77877b4eda675ed7dea3f65baa2 100644 --- a/lib/Service/NewsLetterService.php +++ b/lib/Service/NewsLetterService.php @@ -28,24 +28,24 @@ class NewsLetterService { $this->logger = $logger; } - public function setNewsletterSignup(bool $newsletterEos, bool $newsletterProduct, string $userEmail, string $language): void { + public function setNewsletterSignup(bool $newsletterEos, bool $newsletterProduct, bool $newsletterB2B, string $userEmail, string $language): void { try { - if ($newsletterEos || $newsletterProduct) { - $listIds = []; - $newsletterListIds = $this->config->getSystemValue('newsletter_list_ids'); - if ($newsletterEos) { - $listIds[] = $newsletterListIds['eos']; - } + $listIds = []; + $newsletterListIds = $this->config->getSystemValue('newsletter_list_ids'); + if ($newsletterEos) { + $listIds[] = $newsletterListIds['eos']; + } + + if ($newsletterProduct) { + $listIds[] = $newsletterListIds['product']; + } - if ($newsletterProduct) { - $listIds[] = $newsletterListIds['product']; - } + if ($newsletterB2B) { + $listIds[] = $newsletterListIds['b2b']; + } - if (!empty($listIds)) { - - $this->signupForNewsletter($userEmail, $listIds, $language); - - } + if (!empty($listIds)) { + $this->signupForNewsletter($userEmail, $listIds, $language); } } catch (Exception $e) { $this->logger->error('Signup for newsletter failed: ' . $e->getMessage()); diff --git a/src/Signup.vue b/src/Signup.vue index 719b96ff31dd8f702ed68bc3466503dc0eca6994..9f0d163c0547d2ab2c2c6c5cebeac2e8cbb9b705 100644 --- a/src/Signup.vue +++ b/src/Signup.vue @@ -97,6 +97,7 @@ export default { language: this.formData.selectedLanguage, newsletterEos: this.formData.newsletterEos, newsletterProduct: this.formData.newsletterProduct, + newsletterB2B: this.formData.newsletterB2B } this.submitForm(data) } diff --git a/src/signup/RegistrationForm.vue b/src/signup/RegistrationForm.vue index 89f1feedb832ebaafbf6e9630ff90d6aed6c2865..15fad12dc264593fc503bcde6257abf7a8035907 100644 --- a/src/signup/RegistrationForm.vue +++ b/src/signup/RegistrationForm.vue @@ -150,6 +150,21 @@ + +
+
+
+ + + + +
+
+
+