Merge pull request #604 from ONLYOFFICE/feature/terms-condition

Feature/terms condition
This commit is contained in:
Alexey Safronov 2024-08-28 17:40:14 +04:00 committed by GitHub
commit efb66229de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 52 additions and 11 deletions

View File

@ -30,5 +30,6 @@
"SignUp": "Sign up",
"SuccessDeactivate": "Your account has been successfully deactivated. In 10 seconds you will be redirected to the <1>site</1>.",
"SuccessReactivate": "Your account has been successfully reactivated. In 10 seconds you will be redirected to the <1>portal</1>.",
"SuccessRemoved": "Your account has been successfully removed. In 10 seconds you will be redirected to the <1>site</1>."
"SuccessRemoved": "Your account has been successfully removed. In 10 seconds you will be redirected to the <1>site</1>.",
"TermsAndConditions": "By continuing, you understand and agree to our <1>Terms and conditions</1> and <2>Privacy statement</2>."
}

View File

@ -116,6 +116,10 @@ export const RegisterContainer = styled.div`
.email-container{
${(props) => props.registrationForm && "display:none"};
}
.terms-conditions{
margin: 20px 0;
}
@media ${tablet} {
width: 100%;
}

View File

@ -74,6 +74,7 @@ import LanguageComboboxWrapper from "./LanguageCombobox";
import withCultureNames from "SRC_DIR/HOCs/withCultureNames";
import { setCookie } from "@docspace/shared/utils/cookie";
import { ColorTheme, ThemeId } from "@docspace/shared/components/color-theme";
const DEFAULT_ROOM_TEXT =
"<strong>{{firstName}} {{lastName}}</strong> invites you to join the room <strong>{{roomName}}</strong> for secure document collaboration.";
@ -113,6 +114,9 @@ const CreateUserForm = (props) => {
defaultPage,
cultures,
i18n,
licenseUrl,
legalTerms,
} = props;
const currentCultureName = i18n.language;
@ -473,6 +477,37 @@ const CreateUserForm = (props) => {
}
: {};
const termsConditionsComponent = (
<div className="terms-conditions">
<Text fontSize={"12px"} textAlign="center">
<Trans
t={t}
ns="Confirm"
i18nKey="TermsAndConditions"
components={{
1: (
<ColorTheme
tag="a"
themeId={ThemeId.Link}
href={licenseUrl}
target="_blank"
fontSize={"12px"}
/>
),
2: (
<ColorTheme
tag="a"
themeId={ThemeId.Link}
href={legalTerms}
target="_blank"
fontSize={"12px"}
/>
),
}}
/>
</Text>
</div>
);
return (
<StyledPage>
<LanguageComboboxWrapper
@ -687,6 +722,8 @@ const CreateUserForm = (props) => {
/>
</FieldContainer>
{termsConditionsComponent}
<Button
className="login-button"
primary
@ -738,6 +775,8 @@ export default inject(({ settingsStore, authStore }) => {
currentColorScheme,
userNameRegex,
cultures,
licenseUrl,
legalTerms,
} = settingsStore;
return {
settings: passwordSettings,
@ -752,6 +791,9 @@ export default inject(({ settingsStore, authStore }) => {
currentColorScheme,
userNameRegex,
cultures,
licenseUrl,
legalTerms,
};
})(
withCultureNames(

View File

@ -91,7 +91,7 @@ const Wizard = (props) => {
getIsRequiredLicense,
getPortalTimezones,
machineName,
urlLicense,
licenseUrl,
theme,
cultureNames,
culture,
@ -496,11 +496,7 @@ const Wizard = (props) => {
}
fontSize="13px"
target="_blank"
href={
urlLicense
? urlLicense
: "https://gnu.org/licenses/gpl-3.0.html"
}
href={licenseUrl}
>
{t("LicenseLink")}
</Link>
@ -527,7 +523,7 @@ export default inject(({ authStore, settingsStore, wizardStore }) => {
passwordSettings,
wizardToken,
timezone,
urlLicense,
licenseUrl,
hashSettings,
setWizardComplete,
getPortalTimezones,
@ -556,7 +552,7 @@ export default inject(({ authStore, settingsStore, wizardStore }) => {
wizardToken,
passwordSettings,
timezone,
urlLicense,
licenseUrl,
hashSettings,
isWizardLoaded,
machineName,

View File

@ -162,8 +162,6 @@ class SettingsStore {
enabledJoin = false;
urlLicense = "https://gnu.org/licenses/gpl-3.0.html";
urlSupport = "https://helpdesk.onlyoffice.com/";
forumLink = null;