contentoh-components-library 21.0.42 → 21.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -92,14 +92,15 @@ var RegistrationFirstStep = function RegistrationFirstStep(props) {
|
|
|
92
92
|
}, []);
|
|
93
93
|
|
|
94
94
|
var validate = function validate(evt) {
|
|
95
|
-
var valid = true;
|
|
96
|
-
evt.preventDefault();
|
|
97
95
|
var name = document.querySelector("#nameInput").value;
|
|
98
96
|
var lastName = document.querySelector("#lastNameInput").value;
|
|
99
97
|
var email = document.querySelector("#emailInput").value;
|
|
100
98
|
var job = document.querySelector("#jobInput").value;
|
|
101
99
|
var phone = document.querySelector("#phoneInput").value;
|
|
102
100
|
var country = document.querySelector("#countrySelect").value;
|
|
101
|
+
var countryCode = document.querySelector("#countryCodeSelect").value;
|
|
102
|
+
var valid = true;
|
|
103
|
+
evt.preventDefault();
|
|
103
104
|
name === "" ? setEmptyName(true) : setEmptyName(false);
|
|
104
105
|
lastName === "" ? setEmptyLastName(true) : setEmptyLastName(false);
|
|
105
106
|
email === "" ? setEmptyEmail(true) : setEmptyEmail(false);
|
|
@@ -117,12 +118,6 @@ var RegistrationFirstStep = function RegistrationFirstStep(props) {
|
|
|
117
118
|
valid = false;
|
|
118
119
|
} else valid = true;
|
|
119
120
|
|
|
120
|
-
return valid;
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
var validateForm = function validateForm(evt, valid) {
|
|
124
|
-
var countryCode = document.querySelector("#countryCodeSelect").value;
|
|
125
|
-
evt.preventDefault();
|
|
126
121
|
var nuevoUsuario = JSON.parse(sessionStorage.getItem("nuevoRegistro"));
|
|
127
122
|
|
|
128
123
|
if (valid) {
|
|
@@ -274,8 +269,7 @@ var RegistrationFirstStep = function RegistrationFirstStep(props) {
|
|
|
274
269
|
buttonType: "general-default-button",
|
|
275
270
|
label: "Enviar",
|
|
276
271
|
onClick: function onClick(e) {
|
|
277
|
-
|
|
278
|
-
validateForm(e, flag);
|
|
272
|
+
validate(e);
|
|
279
273
|
}
|
|
280
274
|
})
|
|
281
275
|
}, "4"), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 50%;\n height: 100vh;\n .button-center {\n position: absolute;\n bottom:
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 50%;\n height: 100vh;\n .button-center {\n position: absolute;\n bottom: 10%;\n left: 65%;\n .general-default-button {\n width: 160px;\n }\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.Container = Container;
|
package/package.json
CHANGED
|
@@ -35,14 +35,15 @@ export const RegistrationFirstStep = (props) => {
|
|
|
35
35
|
sessionStorage.getItem("resetPasswordProcess");
|
|
36
36
|
}, []);
|
|
37
37
|
const validate = (evt) => {
|
|
38
|
+
const name = document.querySelector("#nameInput").value;
|
|
39
|
+
const lastName = document.querySelector("#lastNameInput").value;
|
|
40
|
+
const email = document.querySelector("#emailInput").value;
|
|
41
|
+
const job = document.querySelector("#jobInput").value;
|
|
42
|
+
const phone = document.querySelector("#phoneInput").value;
|
|
43
|
+
const country = document.querySelector("#countrySelect").value;
|
|
44
|
+
const countryCode = document.querySelector("#countryCodeSelect").value;
|
|
38
45
|
let valid = true;
|
|
39
46
|
evt.preventDefault();
|
|
40
|
-
const name = document.querySelector("#nameInput").value;
|
|
41
|
-
const lastName = document.querySelector("#lastNameInput").value;
|
|
42
|
-
const email = document.querySelector("#emailInput").value;
|
|
43
|
-
const job = document.querySelector("#jobInput").value;
|
|
44
|
-
const phone = document.querySelector("#phoneInput").value;
|
|
45
|
-
const country = document.querySelector("#countrySelect").value;
|
|
46
47
|
name === "" ? setEmptyName(true) : setEmptyName(false);
|
|
47
48
|
lastName === "" ? setEmptyLastName(true) : setEmptyLastName(false);
|
|
48
49
|
email === "" ? setEmptyEmail(true) : setEmptyEmail(false);
|
|
@@ -77,12 +78,6 @@ export const RegistrationFirstStep = (props) => {
|
|
|
77
78
|
) {
|
|
78
79
|
valid = false;
|
|
79
80
|
} else valid = true;
|
|
80
|
-
|
|
81
|
-
return valid;
|
|
82
|
-
};
|
|
83
|
-
const validateForm = (evt, valid) => {
|
|
84
|
-
const countryCode = document.querySelector("#countryCodeSelect").value;
|
|
85
|
-
evt.preventDefault();
|
|
86
81
|
let nuevoUsuario = JSON.parse(sessionStorage.getItem("nuevoRegistro"));
|
|
87
82
|
if (valid) {
|
|
88
83
|
sessionStorage.setItem("countryCode", JSON.stringify(countryCode));
|
|
@@ -198,8 +193,7 @@ export const RegistrationFirstStep = (props) => {
|
|
|
198
193
|
buttonType={"general-default-button"}
|
|
199
194
|
label={"Enviar"}
|
|
200
195
|
onClick={(e) => {
|
|
201
|
-
|
|
202
|
-
validateForm(e, flag);
|
|
196
|
+
validate(e);
|
|
203
197
|
}}
|
|
204
198
|
/>
|
|
205
199
|
</div>,
|