diff --git a/web/ASC.Web.LoginMobile/src/components/pages/Registration/Registration.jsx b/web/ASC.Web.LoginMobile/src/components/pages/Registration/Registration.jsx
index f5e96fb121..310c86376c 100644
--- a/web/ASC.Web.LoginMobile/src/components/pages/Registration/Registration.jsx
+++ b/web/ASC.Web.LoginMobile/src/components/pages/Registration/Registration.jsx
@@ -1,12 +1,13 @@
-import React, { useEffect } from "react";
+import React, { useEffect, useState } from "react";
import styled from "styled-components";
import { withTranslation } from "react-i18next";
import { Box } from "ASC.Web.Components";
import i18n from "../../../i18n";
-import Header from "../../Header";
-import { RegistrationTitle } from "./sub-components";
+import { fakeApi } from "LoginMobileApi";
+
+import { RegistrationTitle, RegistrationForm } from "./sub-components";
const StyledRegistration = styled(Box)`
display: grid;
@@ -15,14 +16,22 @@ const StyledRegistration = styled(Box)`
align-items: center;
margin: 33px 32px 0 32px;
height: min-content;
+ width: 100%;
`;
const RegistrationComponent = ({ t }) => {
+ const [isLoading, setIsLoading] = useState(false);
+
+ const onJoinHandler = (portalName, email, FirstName, LastName, pass) => {
+ setIsLoading(true);
+ fakeApi.join( portalName, email, FirstName, LastName, pass);
+ };
+
return (
<>
- Registration
+
>
);
diff --git a/web/ASC.Web.LoginMobile/src/components/pages/Registration/sub-components/index.js b/web/ASC.Web.LoginMobile/src/components/pages/Registration/sub-components/index.js
index 045e5823f7..f0569a1337 100644
--- a/web/ASC.Web.LoginMobile/src/components/pages/Registration/sub-components/index.js
+++ b/web/ASC.Web.LoginMobile/src/components/pages/Registration/sub-components/index.js
@@ -1 +1,2 @@
export { default as RegistrationTitle } from "./registration-title";
+export { default as RegistrationForm } from "./registration-form";
diff --git a/web/ASC.Web.LoginMobile/src/components/pages/Registration/sub-components/registration-form.js b/web/ASC.Web.LoginMobile/src/components/pages/Registration/sub-components/registration-form.js
new file mode 100644
index 0000000000..a5c970e1c0
--- /dev/null
+++ b/web/ASC.Web.LoginMobile/src/components/pages/Registration/sub-components/registration-form.js
@@ -0,0 +1,143 @@
+import React, { useState } from "react";
+import styled from "styled-components";
+
+import { Button } from "ASC.Web.Components";
+
+import { EmailField, PasswordField, TextField } from "../../../fields";
+
+const StyledRegistrationForm = styled("form")`
+ width: 100%;
+ display: grid;
+ grid-template-columns: 1fr;
+ margin-top: 6px;
+
+ .registration-button {
+ margin-top: 28px;
+ }
+`;
+
+const RegistrationForm = ({ t, isLoading, onJoin }) => {
+ const [portalName, setPortalName] = useState({
+ val: "",
+ isValid: false,
+ });
+
+ const [email, setEmail] = useState({ val: "", isValid: false });
+
+ const [firstName, setFirstName] = useState({
+ val: "",
+ isValid: false,
+ });
+
+ const [lastName, setLastName] = useState({
+ val: "",
+ isValid: false,
+ });
+
+ const [password, setPassword] = useState({
+ val: "",
+ isValid: false,
+ });
+
+ const [hasError, setHasError] = useState(false);
+
+ const onChangePortalNameHandler = (val, isValid) => {
+ setPortalName({ val, isValid });
+ };
+
+ const onChangeEmailHandler = (val, isValid) => {
+ setEmail({ val, isValid });
+ };
+
+ const onChangeFirstNameHandler = (val, isValid) => {
+ setFirstName({ val, isValid });
+ };
+
+ const onChangeLastNameHandler = (val, isValid) => {
+ setLastName({ val, isValid });
+ };
+
+ const onChangePasswordHandler = (val, isValid) => {
+ setPassword({ val, isValid });
+ };
+
+ const onSubmitHandler = () => {
+ const isValid = checkingValid();
+ if (!isValid) return;
+ onJoin(
+ portalName.val,
+ email.val,
+ firstName.val,
+ lastName.val,
+ password.val
+ );
+ };
+
+ const checkingValid = () => {
+ let isValid = false;
+ if (
+ portalName.isValid &&
+ email.isValid &&
+ firstName.isValid &&
+ lastName.isValid &&
+ password.isValid
+ ) {
+ isValid = true;
+ }
+ setHasError(!isValid);
+ return isValid;
+ };
+
+ return (
+
+
+
+
+
+
+
+
+ );
+};
+
+export default RegistrationForm;
diff --git a/web/ASC.Web.LoginMobile/src/locales/en/translation.json b/web/ASC.Web.LoginMobile/src/locales/en/translation.json
index d4b5c13280..700e2c7040 100644
--- a/web/ASC.Web.LoginMobile/src/locales/en/translation.json
+++ b/web/ASC.Web.LoginMobile/src/locales/en/translation.json
@@ -18,10 +18,16 @@
"TooltipPasswordLength": "-30 characters",
"TooltipPasswordDigits": "digits",
"TooltipPasswordCapital": "capital letters",
- "TooltipPasswordSpecial": "special characters (!@#$%^&*)",
+ "TooltipPasswordSpecial": "special characters (!@#$%^&*)",
"LoginRegistrationBtn": "Register",
"RegistrationTitle": "Cloud office applications",
"RegistrationDesc": "Create portal",
"IncorrectEmail": "Incorrect email",
- "LengthPassLess": "Add {{lengthSetting}} characters"
+ "LengthPassLess": "Add {{lengthSetting}} characters",
+ "JoinBtn": "Join",
+ "PlaceholderPortalName": "portalname",
+ "PlaceholderFirstName": "First name",
+ "PlaceholderLastName": "Last name",
+ "LocalDomain": "Incorrect local domain",
+ "IncorrectDomain": "Incorrect domain"
}
\ No newline at end of file
diff --git a/web/ASC.Web.LoginMobile/src/locales/ru/translation.json b/web/ASC.Web.LoginMobile/src/locales/ru/translation.json
index 6ca343959f..0eadfcb3a2 100644
--- a/web/ASC.Web.LoginMobile/src/locales/ru/translation.json
+++ b/web/ASC.Web.LoginMobile/src/locales/ru/translation.json
@@ -23,5 +23,11 @@
"RegistrationTitle": "Облачные офисные приложения",
"RegistrationDesc": "Создать портал",
"IncorrectEmail": "Неверный email",
- "LengthPassLess": "Добавьте {{lengthSetting}} символов"
+ "LengthPassLess": "Добавьте {{lengthSetting}} символов",
+ "JoinBtn": "Присоединиться",
+ "PlaceholderPortalName": "portalname",
+ "PlaceholderFirstName": "Имя",
+ "PlaceholderLastName": "Фамилия",
+ "LocalDomain": "Некорректный локальный домен",
+ "IncorrectDomain": "Некорректный домен"
}
\ No newline at end of file