From 07f71bb96e533b937f70b540e445e768d175010f Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 7 Nov 2023 17:16:03 +0530 Subject: [PATCH] Add self signup URL text to the branding. --- .../src/extensions/i18n/models/extensions.ts | 5 ++++ .../i18n/resources/en-US/extensions.ts | 5 ++++ .../i18n/resources/fr-FR/extensions.ts | 5 ++++ .../i18n/resources/si-LK/extensions.ts | 5 ++++ .../components/advanced/advance-form.tsx | 29 +++++++++++++++++++ .../components/branding-preference-tabs.tsx | 1 + .../branding/models/branding-preferences.ts | 4 +++ 7 files changed, 54 insertions(+) diff --git a/apps/console/src/extensions/i18n/models/extensions.ts b/apps/console/src/extensions/i18n/models/extensions.ts index 999f06d6d38..0d0b4ecd771 100755 --- a/apps/console/src/extensions/i18n/models/extensions.ts +++ b/apps/console/src/extensions/i18n/models/extensions.ts @@ -1147,6 +1147,11 @@ export interface Extensions { label: string; placeholder: string; }; + selfSignUpURL: { + hint: string; + label: string; + placeholder: string; + }; termsOfUseURL: { hint: string; label: string; diff --git a/apps/console/src/extensions/i18n/resources/en-US/extensions.ts b/apps/console/src/extensions/i18n/resources/en-US/extensions.ts index 5425c6e44b6..f737434a478 100755 --- a/apps/console/src/extensions/i18n/resources/en-US/extensions.ts +++ b/apps/console/src/extensions/i18n/resources/en-US/extensions.ts @@ -1332,6 +1332,11 @@ export const extensions: Extensions = { label: "Privacy Policy", placeholder: "https://myapp.com/{{locale}}/privacy-policy" }, + selfSignUpURL: { + hint: "Link to your organization's Self Signup webpage. You can use placeholders like <1>{{lang}}, <3>{{country}}, or <5>{{locale}} to customize the URL for different regions or languages.", + label: "Self Signup", + placeholder: "https://myapp.com/self-signup" + }, termsOfUseURL: { hint: "Link to an agreement that your customers must agree to and abide by in order to use your organization's applications or other services. You can use placeholders like <1>{{lang}}, <3>{{country}}, or <5>{{locale}} to customize the URL for different regions or languages.", label: "Terms of Service", diff --git a/apps/console/src/extensions/i18n/resources/fr-FR/extensions.ts b/apps/console/src/extensions/i18n/resources/fr-FR/extensions.ts index 7b60d0a13cf..c7c3b3cbfa0 100755 --- a/apps/console/src/extensions/i18n/resources/fr-FR/extensions.ts +++ b/apps/console/src/extensions/i18n/resources/fr-FR/extensions.ts @@ -1333,6 +1333,11 @@ export const extensions: Extensions = { label: "politique de confidentialité", placeholder: "https://myapp.com/{{locale}}/privacy-policy" }, + selfSignUpURL: { + hint: "Lien vers la page Web d'auto-inscription de votre organisation. Vous pouvez utiliser des espaces réservés comme <1>{{lang}}, <3>{{country}}, ou <5>{{locale}} pour personnaliser l'URL pour différentsrégions ou langues.", + label: "Auto-inscription", + placeholder: "https://myapp.com/self-signup" + }, termsOfUseURL: { hint: "Lien vers un accord que vos clients doivent accepter et respecter afin d'utiliser les applications ou d'autres services de votre organisation.Vous pouvez utiliser des espaces réservés comme <1>{{lang}}, <3>{{country}}, ou <5>{{locale}} pour personnaliser l'URL pour différentsrégions ou langues.", label: "Conditions d'utilisation", diff --git a/apps/console/src/extensions/i18n/resources/si-LK/extensions.ts b/apps/console/src/extensions/i18n/resources/si-LK/extensions.ts index 741992d5810..3c2c8d0fdcb 100755 --- a/apps/console/src/extensions/i18n/resources/si-LK/extensions.ts +++ b/apps/console/src/extensions/i18n/resources/si-LK/extensions.ts @@ -1314,6 +1314,11 @@ export const extensions: Extensions = { label: "රහස්යතා ප්රතිපත්තිය", placeholder: "https://myapp.com/{{locale}}/privacy-policy" }, + selfSignUpURL: { + hint: "ඔබේ සංවිධානයේ ස්වයං ලියාපදිංචි වීමේ වෙබ් පිටුවට සම්බන්ධ වන්න. විවිධ කලාප හෝ භාෂා සඳහා URL අභිරුචිකරණය කිරීමට <1>{{lang}}, <3>{{country}}, හෝ <5>{{locale}} placeholders භාවිතා කළ හැකිය.", + label: "ස්වයං ලියාපදිංචි වීම", + placeholder: "https://myapp.com/self-signup" + }, termsOfUseURL: { hint: "ඔබේ ආයෝජන යෙදුම් හෝ වෙනත් සේවාවන් භාවිතා කිරීම සඳහා ඔබේ ගනුදෙනුකරුවන් ඊට එකඟ වී පිළිපැදිය යුතු ගිවිසුමකට සම්බන්ධ වන්න. විවිධ කලාප හෝ භාෂා සඳහා URL අභිරුචිකරණය කිරීමට <1>{{lang}}, <3>{{country}}, හෝ <5>{{locale}} placeholders භාවිතා කළ හැකිය.", label: "සේවා කොන්දේසි", diff --git a/apps/console/src/features/branding/components/advanced/advance-form.tsx b/apps/console/src/features/branding/components/advanced/advance-form.tsx index 123c47c2a6f..049ea56734f 100644 --- a/apps/console/src/features/branding/components/advanced/advance-form.tsx +++ b/apps/console/src/features/branding/components/advanced/advance-form.tsx @@ -95,6 +95,7 @@ export const AdvanceForm: FunctionComponent = forward const [ privacyPolicyURL, setPrivacyPolicyURL ] = useState(initialValues.urls.privacyPolicyURL); const [ termsOfUseURL, setTermsOfUseURL ] = useState(initialValues.urls.termsOfUseURL); const [ cookiePolicyURL, setCookiePolicyURL ] = useState(initialValues.urls.cookiePolicyURL); + const [ selfSignUpURL, setSelfSignUpURL ] = useState(initialValues.urls.selfSignUpURL); /** * Broadcast values to the outside when internals change. @@ -107,6 +108,7 @@ export const AdvanceForm: FunctionComponent = forward ...initialValues.urls, cookiePolicyURL: cookiePolicyURL, privacyPolicyURL: privacyPolicyURL, + selfSignUpURL: selfSignUpURL, termsOfUseURL: termsOfUseURL } }); @@ -258,6 +260,33 @@ export const AdvanceForm: FunctionComponent = forward data-testid={ `${ componentId }-cookie-policy-url` } validation={ validateTemplatableURLs } /> + + Link to your organization's Self Signup webpage. You can use placeholders like + {{lang}}, {{country}}, + or {{locale}} to customize the URL for different + regions or languages. + + ) } + required={ false } + value={ initialValues.urls.selfSignUpURL } + readOnly={ readOnly } + maxLength={ BrandingPreferencesConstants.ADVANCE_FORM_FIELD_CONSTRAINTS.COOKIE_POLICY_URL_MAX_LENGTH } + minLength={ BrandingPreferencesConstants.ADVANCE_FORM_FIELD_CONSTRAINTS.COOKIE_POLICY_URL_MIN_LENGTH } + listen={ (value: string) => setSelfSignUpURL(value) } + width={ 16 } + data-testid={ `${ componentId }-self-signup-url` } + /> ); }); diff --git a/apps/console/src/features/branding/components/branding-preference-tabs.tsx b/apps/console/src/features/branding/components/branding-preference-tabs.tsx index 91f03940333..78d8b8a3c4a 100644 --- a/apps/console/src/features/branding/components/branding-preference-tabs.tsx +++ b/apps/console/src/features/branding/components/branding-preference-tabs.tsx @@ -291,6 +291,7 @@ export const BrandingPreferenceTabs: FunctionComponent