| @@ -110,7 +110,7 @@ const CustomFormWizard = (props) => { | |||||
| useEffect(() => { | useEffect(() => { | ||||
| changePassword(''); | changePassword(''); | ||||
| if(captchaImg=="") | |||||
| if (captchaImg == "") | |||||
| onCaptchaChange(); | onCaptchaChange(); | ||||
| }, []); | }, []); | ||||
| @@ -171,7 +171,7 @@ const CustomFormWizard = (props) => { | |||||
| const onCaptchaChange = () => { | const onCaptchaChange = () => { | ||||
| HttpUtils.post({ | HttpUtils.post({ | ||||
| url: POST_CAPTCHA, | url: POST_CAPTCHA, | ||||
| params: { width: 130, height: 40, captcha: captchaImg}, | |||||
| params: { width: 130, height: 40, captcha: captchaImg }, | |||||
| onSuccess: (responseData) => { | onSuccess: (responseData) => { | ||||
| props.setBase64Url(responseData.base64Url) | props.setBase64Url(responseData.base64Url) | ||||
| localStorage.setItem("base64Url", responseData.base64Url); | localStorage.setItem("base64Url", responseData.base64Url); | ||||
| @@ -300,7 +300,7 @@ const CustomFormWizard = (props) => { | |||||
| useEffect(() => { | useEffect(() => { | ||||
| props.step == 2 ? _onSubmit() : null; | props.step == 2 ? _onSubmit() : null; | ||||
| if(captchaImg=="") | |||||
| if (captchaImg == "") | |||||
| onCaptchaChange(); | onCaptchaChange(); | ||||
| checkDataField(values) | checkDataField(values) | ||||
| }, [props.step]) | }, [props.step]) | ||||
| @@ -309,7 +309,7 @@ const CustomFormWizard = (props) => { | |||||
| const _onSubmit = () => { | const _onSubmit = () => { | ||||
| setLoding(true); | setLoding(true); | ||||
| values.idDocType = selectedIdDocType.type | values.idDocType = selectedIdDocType.type | ||||
| values.address4 = selectedAddress4==null?"":selectedAddress4.key | |||||
| values.address4 = selectedAddress4 == null ? "" : selectedAddress4.key | |||||
| values.address5 = selectedAddress5.key | values.address5 = selectedAddress5.key | ||||
| // console.log(values) | // console.log(values) | ||||
| const userAddress = { | const userAddress = { | ||||
| @@ -383,7 +383,7 @@ const CustomFormWizard = (props) => { | |||||
| }) | }) | ||||
| .then(( | .then(( | ||||
| // response | // response | ||||
| ) => { | |||||
| ) => { | |||||
| // console.log(response) | // console.log(response) | ||||
| setCheckUpload(true) | setCheckUpload(true) | ||||
| setLoding(false); | setLoding(false); | ||||
| @@ -551,27 +551,27 @@ const CustomFormWizard = (props) => { | |||||
| captchaField: '' | captchaField: '' | ||||
| }), | }), | ||||
| validationSchema: yup.object().shape({ | validationSchema: yup.object().shape({ | ||||
| username: yup.string().min(6, displayErrorMsg(intl.formatMessage({id: 'atLeast6CharAccount'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireUsername'}))) | |||||
| .matches(/^[aA-zZ0-9\s]+$/, { message: displayErrorMsg(intl.formatMessage({id: 'noSpecialCharAccount'})) }) | |||||
| .matches(/^\S*$/, { message: displayErrorMsg(intl.formatMessage({id: 'noSpaceAccount'})) }), | |||||
| password: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'atLeast8CharPassword'}))).required(displayErrorMsg(intl.formatMessage({id: 'requirePassword'}))) | |||||
| .matches(/^\S*$/, { message: displayErrorMsg(intl.formatMessage({id: 'noSpacePassword'})) }) | |||||
| .matches(/^(?=.*[a-z])/, { message: displayErrorMsg(intl.formatMessage({id: 'atLeastOneSmallLetter'})) }) | |||||
| .matches(/^(?=.*[A-Z])/, { message: displayErrorMsg(intl.formatMessage({id: 'atLeastOneCapLetter'})) }) | |||||
| .matches(/^(?=.*[0-9])/, { message: displayErrorMsg(intl.formatMessage({id: 'atLeast1Number'})) }) | |||||
| .matches(/^(?=.*[!@#%&])/, { message: displayErrorMsg(intl.formatMessage({id: 'atLeast1SpecialChar'})) }), | |||||
| confirmPassword: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'atLeast8CharPassword'}))).required(displayErrorMsg(intl.formatMessage({id: 'pleaseConfirmPassword'}))).oneOf([yup.ref('password'), null], displayErrorMsg(intl.formatMessage({id: 'samePassword'}))), | |||||
| enName: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'userRequireEnglishName'}))), | |||||
| chName: yup.string().max(6).required(displayErrorMsg(intl.formatMessage({id: 'userRequireChineseName'}))), | |||||
| address1: yup.string().max(40).required(displayErrorMsg(intl.formatMessage({id: 'validateAddressLine1'}))), | |||||
| address2: yup.string().max(40).required(displayErrorMsg(intl.formatMessage({id: 'validateAddressLine2'}))), | |||||
| address3: yup.string().max(40).required(displayErrorMsg(intl.formatMessage({id: 'validateAddressLine3'}))), | |||||
| email: yup.string().email(displayErrorMsg(intl.formatMessage({id: 'validEmailFormat'}))).max(255).required(displayErrorMsg(intl.formatMessage({id: 'requireEmail'}))), | |||||
| emailConfirm: yup.string().email(displayErrorMsg(intl.formatMessage({id: 'validEmailFormat'}))).max(255).required(displayErrorMsg(intl.formatMessage({id: 'requireEmail'}))).oneOf([yup.ref('email'), null], displayErrorMsg(intl.formatMessage({id: 'validSameEmail'}))), | |||||
| idNo: yup.string().required(displayErrorMsg(`${intl.formatMessage({id: 'require'})}${selectedIdDocInputType}${intl.formatMessage({id: 'number'})}`)) | |||||
| .matches(/^[aA-zZ0-9\s]+$/, { message: displayErrorMsg(`${selectedIdDocInputType}${intl.formatMessage({id: 'noSpecialCharacter'})}`) }) | |||||
| .matches(/^\S*$/, { message: displayErrorMsg(`${selectedIdDocInputType}${intl.formatMessage({id: 'noSpace'})}`) }) | |||||
| .test('checkIDCardFormat', displayErrorMsg(`${intl.formatMessage({id: 'requiredValid'})}${selectedIdDocInputType}${intl.formatMessage({id: 'number'})}`), function (value) { | |||||
| username: yup.string().min(6, displayErrorMsg(intl.formatMessage({ id: 'atLeast6CharAccount' }))).required(displayErrorMsg(intl.formatMessage({ id: 'requireUsername' }))) | |||||
| .matches(/^[aA-zZ0-9\s]+$/, { message: displayErrorMsg(intl.formatMessage({ id: 'noSpecialCharAccount' })) }) | |||||
| .matches(/^\S*$/, { message: displayErrorMsg(intl.formatMessage({ id: 'noSpaceAccount' })) }), | |||||
| password: yup.string().min(8, displayErrorMsg(intl.formatMessage({ id: 'atLeast8CharPassword' }))).required(displayErrorMsg(intl.formatMessage({ id: 'requirePassword' }))) | |||||
| .matches(/^\S*$/, { message: displayErrorMsg(intl.formatMessage({ id: 'noSpacePassword' })) }) | |||||
| .matches(/^(?=.*[a-z])/, { message: displayErrorMsg(intl.formatMessage({ id: 'atLeastOneSmallLetter' })) }) | |||||
| .matches(/^(?=.*[A-Z])/, { message: displayErrorMsg(intl.formatMessage({ id: 'atLeastOneCapLetter' })) }) | |||||
| .matches(/^(?=.*[0-9])/, { message: displayErrorMsg(intl.formatMessage({ id: 'atLeast1Number' })) }) | |||||
| .matches(/^(?=.*[!@#%&])/, { message: displayErrorMsg(intl.formatMessage({ id: 'atLeast1SpecialChar' })) }), | |||||
| confirmPassword: yup.string().min(8, displayErrorMsg(intl.formatMessage({ id: 'atLeast8CharPassword' }))).required(displayErrorMsg(intl.formatMessage({ id: 'pleaseConfirmPassword' }))).oneOf([yup.ref('password'), null], displayErrorMsg(intl.formatMessage({ id: 'samePassword' }))), | |||||
| enName: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({ id: 'userRequireEnglishName' }))), | |||||
| chName: yup.string().max(6).required(displayErrorMsg(intl.formatMessage({ id: 'userRequireChineseName' }))), | |||||
| address1: yup.string().max(40).required(displayErrorMsg(intl.formatMessage({ id: 'validateAddressLine1' }))), | |||||
| address2: yup.string().max(40).required(displayErrorMsg(intl.formatMessage({ id: 'validateAddressLine2' }))), | |||||
| address3: yup.string().max(40).required(displayErrorMsg(intl.formatMessage({ id: 'validateAddressLine3' }))), | |||||
| email: yup.string().email(displayErrorMsg(intl.formatMessage({ id: 'validEmailFormat' }))).max(255).required(displayErrorMsg(intl.formatMessage({ id: 'requireEmail' }))), | |||||
| emailConfirm: yup.string().email(displayErrorMsg(intl.formatMessage({ id: 'validEmailFormat' }))).max(255).required(displayErrorMsg(intl.formatMessage({ id: 'requireEmail' }))).oneOf([yup.ref('email'), null], displayErrorMsg(intl.formatMessage({ id: 'validSameEmail' }))), | |||||
| idNo: yup.string().required(displayErrorMsg(`${intl.formatMessage({ id: 'require' })}${selectedIdDocInputType}${intl.formatMessage({ id: 'number' })}`)) | |||||
| .matches(/^[aA-zZ0-9\s]+$/, { message: displayErrorMsg(`${selectedIdDocInputType}${intl.formatMessage({ id: 'noSpecialCharacter' })}`) }) | |||||
| .matches(/^\S*$/, { message: displayErrorMsg(`${selectedIdDocInputType}${intl.formatMessage({ id: 'noSpace' })}`) }) | |||||
| .test('checkIDCardFormat', displayErrorMsg(`${intl.formatMessage({ id: 'requiredValid' })}${selectedIdDocInputType}${intl.formatMessage({ id: 'number' })}`), function (value) { | |||||
| const idDocType = selectedIdDocType.type; | const idDocType = selectedIdDocType.type; | ||||
| var pattern_HKIDv1 = /^[A-Z]{1}[0-9]{6}$/; | var pattern_HKIDv1 = /^[A-Z]{1}[0-9]{6}$/; | ||||
| var pattern_HKIDv2 = /^[A-Z]{2}[0-9]{6}$/; | var pattern_HKIDv2 = /^[A-Z]{2}[0-9]{6}$/; | ||||
| @@ -622,13 +622,13 @@ const CustomFormWizard = (props) => { | |||||
| } | } | ||||
| } | } | ||||
| }), | }), | ||||
| checkDigit: yup.string().max(1).required(displayErrorMsg(intl.formatMessage({id: 'requiredNumberInQuote'}))), | |||||
| idDocType: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'requireIdDocType'}))), | |||||
| phoneCountryCode: yup.string().min(2, displayErrorMsg(intl.formatMessage({id: 'requireAtLeast2Number'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))), | |||||
| checkDigit: yup.string().max(1).required(displayErrorMsg(intl.formatMessage({ id: 'requiredNumberInQuote' }))), | |||||
| idDocType: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({ id: 'requireIdDocType' }))), | |||||
| phoneCountryCode: yup.string().min(2, displayErrorMsg(intl.formatMessage({ id: 'requireAtLeast2Number' }))).required(displayErrorMsg(intl.formatMessage({ id: 'requireDialingCode' }))), | |||||
| // faxCountryCode: yup.string().min(3,'請輸入3位數字'), | // faxCountryCode: yup.string().min(3,'請輸入3位數字'), | ||||
| phone: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'requireAtLeast8Number'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireContactNumber'}))), | |||||
| phone: yup.string().min(8, displayErrorMsg(intl.formatMessage({ id: 'requireAtLeast8Number' }))).required(displayErrorMsg(intl.formatMessage({ id: 'requireContactNumber' }))), | |||||
| // fax: yup.string().min(8,'請輸入8位數字'), | // fax: yup.string().min(8,'請輸入8位數字'), | ||||
| captchaField: yup.string().required(displayErrorMsg(intl.formatMessage({id: 'requireVerify'}))),//.oneOf([captcha], displayErrorMsg('請輸入有效驗證')), | |||||
| captchaField: yup.string().required(displayErrorMsg(intl.formatMessage({ id: 'requireVerify' }))),//.oneOf([captcha], displayErrorMsg('請輸入有效驗證')), | |||||
| }), | }), | ||||
| }); | }); | ||||
| @@ -661,19 +661,19 @@ const CustomFormWizard = (props) => { | |||||
| <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | ||||
| <Button variant="outlined" type="reset" onClick={handleReset.bind(null, formik.resetForm)} sx={{ height: '40px' }}> | <Button variant="outlined" type="reset" onClick={handleReset.bind(null, formik.resetForm)} sx={{ height: '40px' }}> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="reset"/> | |||||
| <FormattedMessage id="reset" /> | |||||
| </Typography> | </Typography> | ||||
| </Button> | </Button> | ||||
| <div style={{ borderBottom: "3px solid #1A4399", width: "100%", margin_right: "15px" }}> | <div style={{ borderBottom: "3px solid #1A4399", width: "100%", margin_right: "15px" }}> | ||||
| <Typography display="inline" variant="h3" sx={{ color: '#1A4399' }}> | <Typography display="inline" variant="h3" sx={{ color: '#1A4399' }}> | ||||
| <FormattedMessage id="becomeNewPersonalUser"/> | |||||
| <FormattedMessage id="becomeNewPersonalUser" /> | |||||
| </Typography> | </Typography> | ||||
| </div> | </div> | ||||
| <Typography mt={0.25} variant="h6" sx={{ color: '#f10000' }}> | <Typography mt={0.25} variant="h6" sx={{ color: '#f10000' }}> | ||||
| <FormattedMessage id="requireString"/> | |||||
| <FormattedMessage id="requireString" /> | |||||
| </Typography> | </Typography> | ||||
| <Typography mt={0.25} variant="h4" sx={{ color: 'primary.primary' }}> | <Typography mt={0.25} variant="h4" sx={{ color: 'primary.primary' }}> | ||||
| <FormattedMessage id="yourLoginInformation"/> | |||||
| <FormattedMessage id="yourLoginInformation" /> | |||||
| </Typography> | </Typography> | ||||
| </Stack> | </Stack> | ||||
| </Grid> | </Grid> | ||||
| @@ -683,7 +683,7 @@ const CustomFormWizard = (props) => { | |||||
| <Stack spacing={1}> | <Stack spacing={1}> | ||||
| <InputLabel htmlFor="username-signup"> | <InputLabel htmlFor="username-signup"> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="userLoginName"/> | |||||
| <FormattedMessage id="userLoginName" /> | |||||
| <span style={{ color: '#f10000' }}>*</span> | <span style={{ color: '#f10000' }}>*</span> | ||||
| {/*<Button*/} | {/*<Button*/} | ||||
| {/* variant="contained"*/} | {/* variant="contained"*/} | ||||
| @@ -703,7 +703,7 @@ const CustomFormWizard = (props) => { | |||||
| props.setUsername(e.target.value) | props.setUsername(e.target.value) | ||||
| formik.handleChange(e) | formik.handleChange(e) | ||||
| }} | }} | ||||
| placeholder={intl.formatMessage({id: 'userLoginName'})} | |||||
| placeholder={intl.formatMessage({ id: 'userLoginName' })} | |||||
| fullWidth | fullWidth | ||||
| error={Boolean((formik.touched.username && formik.errors.username) || checkUsername)} | error={Boolean((formik.touched.username && formik.errors.username) || checkUsername)} | ||||
| onBlur={formik.handleBlur} | onBlur={formik.handleBlur} | ||||
| @@ -722,7 +722,7 @@ const CustomFormWizard = (props) => { | |||||
| )} | )} | ||||
| {checkUsername && ( | {checkUsername && ( | ||||
| <FormHelperText error id="helper-text-username-signup"> | <FormHelperText error id="helper-text-username-signup"> | ||||
| <FormattedMessage id="usernameTaken"/> | |||||
| <FormattedMessage id="usernameTaken" /> | |||||
| </FormHelperText> | </FormHelperText> | ||||
| )} | )} | ||||
| </Stack> | </Stack> | ||||
| @@ -734,7 +734,7 @@ const CustomFormWizard = (props) => { | |||||
| <Stack direction="row" justifyContent="space-between"> | <Stack direction="row" justifyContent="space-between"> | ||||
| <InputLabel htmlFor="password-signup"> | <InputLabel htmlFor="password-signup"> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="userPassword"/> | |||||
| <FormattedMessage id="userPassword" /> | |||||
| <span style={{ color: '#f10000' }}>*</span> | <span style={{ color: '#f10000' }}>*</span> | ||||
| </Typography> | </Typography> | ||||
| </InputLabel> | </InputLabel> | ||||
| @@ -763,7 +763,7 @@ const CustomFormWizard = (props) => { | |||||
| </IconButton> | </IconButton> | ||||
| </InputAdornment> | </InputAdornment> | ||||
| } | } | ||||
| placeholder={intl.formatMessage({id: 'userPassword'})} | |||||
| placeholder={intl.formatMessage({ id: 'userPassword' })} | |||||
| onBlur={formik.handleBlur} | onBlur={formik.handleBlur} | ||||
| inputProps={{ | inputProps={{ | ||||
| onKeyDown: (e) => { | onKeyDown: (e) => { | ||||
| @@ -786,7 +786,7 @@ const CustomFormWizard = (props) => { | |||||
| </Grid> | </Grid> | ||||
| <Grid item> | <Grid item> | ||||
| <Typography variant="subtitle1"> | <Typography variant="subtitle1"> | ||||
| <FormattedMessage id={level ? level?.label : "pwWeak" }/> | |||||
| <FormattedMessage id={level ? level?.label : "pwWeak"} /> | |||||
| </Typography> | </Typography> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -796,7 +796,7 @@ const CustomFormWizard = (props) => { | |||||
| <Stack spacing={1}> | <Stack spacing={1}> | ||||
| <InputLabel htmlFor="confirmPassword-signup"> | <InputLabel htmlFor="confirmPassword-signup"> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="confirmPassword"/> | |||||
| <FormattedMessage id="confirmPassword" /> | |||||
| <span style={{ color: '#f10000' }}>*</span> | <span style={{ color: '#f10000' }}>*</span> | ||||
| </Typography> | </Typography> | ||||
| </InputLabel> | </InputLabel> | ||||
| @@ -830,7 +830,7 @@ const CustomFormWizard = (props) => { | |||||
| </IconButton> | </IconButton> | ||||
| </InputAdornment> | </InputAdornment> | ||||
| } | } | ||||
| placeholder={intl.formatMessage({id: 'confirmPassword'})} | |||||
| placeholder={intl.formatMessage({ id: 'confirmPassword' })} | |||||
| fullWidth | fullWidth | ||||
| error={Boolean(formik.touched.confirmPassword && formik.errors.confirmPassword)} | error={Boolean(formik.touched.confirmPassword && formik.errors.confirmPassword)} | ||||
| /> | /> | ||||
| @@ -841,12 +841,12 @@ const CustomFormWizard = (props) => { | |||||
| )} | )} | ||||
| </Stack> | </Stack> | ||||
| <Grid container spacing={2} alignItems="center"> | <Grid container spacing={2} alignItems="center"> | ||||
| <Grid item sx={{mt:1}}> | |||||
| <Grid item sx={{ mt: 1 }}> | |||||
| <Typography variant="subtitle1"> | <Typography variant="subtitle1"> | ||||
| •<FormattedMessage id="pwRemark1"/> <br /> | |||||
| •<FormattedMessage id="pwRemark2"/><br /> | |||||
| •<FormattedMessage id="pwRemark3"/><br /> | |||||
| •<FormattedMessage id="pwRemark4"/> | |||||
| •<FormattedMessage id="pwRemark1" /> <br /> | |||||
| •<FormattedMessage id="pwRemark2" /><br /> | |||||
| •<FormattedMessage id="pwRemark3" /><br /> | |||||
| •<FormattedMessage id="pwRemark4" /> | |||||
| </Typography> | </Typography> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -856,7 +856,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} mt={1} mb={1}> | <Grid item xs={12} mt={1} mb={1}> | ||||
| <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | ||||
| <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | ||||
| <FormattedMessage id="yourPersonalInformation"/> | |||||
| <FormattedMessage id="yourPersonalInformation" /> | |||||
| </Typography> | </Typography> | ||||
| {/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | {/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | ||||
| Already have an account? | Already have an account? | ||||
| @@ -868,7 +868,7 @@ const CustomFormWizard = (props) => { | |||||
| <Stack spacing={1}> | <Stack spacing={1}> | ||||
| <InputLabel htmlFor="idDocType-signup"> | <InputLabel htmlFor="idDocType-signup"> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="userIdDoc"/> | |||||
| <FormattedMessage id="userIdDoc" /> | |||||
| <span style={{ color: '#f10000' }}>*</span> | <span style={{ color: '#f10000' }}>*</span> | ||||
| </Typography> | </Typography> | ||||
| </InputLabel> | </InputLabel> | ||||
| @@ -892,9 +892,9 @@ const CustomFormWizard = (props) => { | |||||
| onBlur={formik.handleBlur} | onBlur={formik.handleBlur} | ||||
| filterOptions={(options) => options} | filterOptions={(options) => options} | ||||
| inputValue={selectedIdDocInputType} | inputValue={selectedIdDocInputType} | ||||
| getOptionLabel={(option) => option.label? intl.formatMessage({ id: option.label }) : ""} | |||||
| getOptionLabel={(option) => option.label ? intl.formatMessage({ id: option.label }) : ""} | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| if (newValue != null ) { | |||||
| if (newValue != null) { | |||||
| setSelectedIdDocInputType(intl.formatMessage({ id: newValue.label })); | setSelectedIdDocInputType(intl.formatMessage({ id: newValue.label })); | ||||
| setSelectedIdDocType(newValue); | setSelectedIdDocType(newValue); | ||||
| if (newValue.type !== "HKID") { | if (newValue.type !== "HKID") { | ||||
| @@ -907,13 +907,13 @@ const CustomFormWizard = (props) => { | |||||
| sx={{ "#address4-combo": { padding: "0px 0px 0px 0px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} | sx={{ "#address4-combo": { padding: "0px 0px 0px 0px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} | ||||
| renderInput={(params) => <TextField | renderInput={(params) => <TextField | ||||
| {...params} | {...params} | ||||
| placeholder={intl.formatMessage({id: 'idDocType'})} | |||||
| placeholder={intl.formatMessage({ id: 'idDocType' })} | |||||
| />} | />} | ||||
| /> | /> | ||||
| {formik.touched.idDocType && ( | {formik.touched.idDocType && ( | ||||
| selectedIdDocType === null ? | selectedIdDocType === null ? | ||||
| <FormHelperText error id="helper-text-idDocType-signup"> | <FormHelperText error id="helper-text-idDocType-signup"> | ||||
| <FormattedMessage id="requireIdDocType"/> | |||||
| <FormattedMessage id="requireIdDocType" /> | |||||
| </FormHelperText> : '' | </FormHelperText> : '' | ||||
| )} | )} | ||||
| </Stack> | </Stack> | ||||
| @@ -941,7 +941,7 @@ const CustomFormWizard = (props) => { | |||||
| } | } | ||||
| } | } | ||||
| }} | }} | ||||
| placeholder={intl.formatMessage({id: 'idDocNumber'})} | |||||
| placeholder={intl.formatMessage({ id: 'idDocNumber' })} | |||||
| fullWidth | fullWidth | ||||
| sx={{ mr: 1 }} | sx={{ mr: 1 }} | ||||
| error={Boolean(formik.touched.idNo && formik.errors.idNo)} | error={Boolean(formik.touched.idNo && formik.errors.idNo)} | ||||
| @@ -1021,7 +1021,7 @@ const CustomFormWizard = (props) => { | |||||
| } | } | ||||
| } | } | ||||
| }} | }} | ||||
| placeholder={intl.formatMessage({id: 'idDocNumber'})} | |||||
| placeholder={intl.formatMessage({ id: 'idDocNumber' })} | |||||
| fullWidth | fullWidth | ||||
| sx={{ mr: 1 }} | sx={{ mr: 1 }} | ||||
| error={Boolean(formik.touched.idNo && formik.errors.idNo)} | error={Boolean(formik.touched.idNo && formik.errors.idNo)} | ||||
| @@ -1049,7 +1049,7 @@ const CustomFormWizard = (props) => { | |||||
| <Stack spacing={1}> | <Stack spacing={1}> | ||||
| <InputLabel htmlFor="enName-signup"> | <InputLabel htmlFor="enName-signup"> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="userEnglishName"/> | |||||
| <FormattedMessage id="userEnglishName" /> | |||||
| {selectedIdDocType.type === "CNID" ? "" : <span style={{ color: '#f10000' }}>*</span>} | {selectedIdDocType.type === "CNID" ? "" : <span style={{ color: '#f10000' }}>*</span>} | ||||
| </Typography> | </Typography> | ||||
| </InputLabel> | </InputLabel> | ||||
| @@ -1059,7 +1059,7 @@ const CustomFormWizard = (props) => { | |||||
| value={formik.values.enName} | value={formik.values.enName} | ||||
| name="enName" | name="enName" | ||||
| onChange={formik.handleChange} | onChange={formik.handleChange} | ||||
| placeholder={intl.formatMessage({id: 'sameAsYourIdDoc'})} | |||||
| placeholder={intl.formatMessage({ id: 'sameAsYourIdDoc' })} | |||||
| fullWidth | fullWidth | ||||
| error={Boolean(formik.touched.enName && formik.errors.enName && selectedIdDocType.type !== "CNID")} | error={Boolean(formik.touched.enName && formik.errors.enName && selectedIdDocType.type !== "CNID")} | ||||
| onBlur={formik.handleBlur} | onBlur={formik.handleBlur} | ||||
| @@ -1082,7 +1082,7 @@ const CustomFormWizard = (props) => { | |||||
| <Stack spacing={1}> | <Stack spacing={1}> | ||||
| <InputLabel htmlFor="chName-signup"> | <InputLabel htmlFor="chName-signup"> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="userChineseName"/> | |||||
| <FormattedMessage id="userChineseName" /> | |||||
| <span style={{ color: '#f10000' }}>*</span> | <span style={{ color: '#f10000' }}>*</span> | ||||
| </Typography> | </Typography> | ||||
| </InputLabel> | </InputLabel> | ||||
| @@ -1094,7 +1094,7 @@ const CustomFormWizard = (props) => { | |||||
| value={formik.values.chName.trim()} | value={formik.values.chName.trim()} | ||||
| name="chName" | name="chName" | ||||
| onChange={formik.handleChange} | onChange={formik.handleChange} | ||||
| placeholder={intl.formatMessage({id: 'sameAsYourIdDoc'})} | |||||
| placeholder={intl.formatMessage({ id: 'sameAsYourIdDoc' })} | |||||
| onBlur={formik.handleBlur} | onBlur={formik.handleBlur} | ||||
| inputProps={{ | inputProps={{ | ||||
| maxLength: 6, | maxLength: 6, | ||||
| @@ -1116,7 +1116,7 @@ const CustomFormWizard = (props) => { | |||||
| <Stack spacing={1}> | <Stack spacing={1}> | ||||
| <InputLabel htmlFor="address1-signup"> | <InputLabel htmlFor="address1-signup"> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="formAddress"/> | |||||
| <FormattedMessage id="formAddress" /> | |||||
| <span style={{ color: '#f10000' }}>*</span> | <span style={{ color: '#f10000' }}>*</span> | ||||
| </Typography> | </Typography> | ||||
| </InputLabel> | </InputLabel> | ||||
| @@ -1127,7 +1127,7 @@ const CustomFormWizard = (props) => { | |||||
| value={formik.values.address1} | value={formik.values.address1} | ||||
| name="address1" | name="address1" | ||||
| onChange={formik.handleChange} | onChange={formik.handleChange} | ||||
| placeholder={intl.formatMessage({id: 'addressLine1'})} | |||||
| placeholder={intl.formatMessage({ id: 'addressLine1' })} | |||||
| onBlur={formik.handleBlur} | onBlur={formik.handleBlur} | ||||
| inputProps={{ | inputProps={{ | ||||
| onKeyDown: (e) => { | onKeyDown: (e) => { | ||||
| @@ -1144,7 +1144,7 @@ const CustomFormWizard = (props) => { | |||||
| value={formik.values.address2} | value={formik.values.address2} | ||||
| name="address2" | name="address2" | ||||
| onChange={formik.handleChange} | onChange={formik.handleChange} | ||||
| placeholder={intl.formatMessage({id: 'addressLine2'})} | |||||
| placeholder={intl.formatMessage({ id: 'addressLine2' })} | |||||
| inputProps={{ | inputProps={{ | ||||
| onKeyDown: (e) => { | onKeyDown: (e) => { | ||||
| if (e.key === 'Enter') { | if (e.key === 'Enter') { | ||||
| @@ -1160,7 +1160,7 @@ const CustomFormWizard = (props) => { | |||||
| value={formik.values.address3} | value={formik.values.address3} | ||||
| name="address3" | name="address3" | ||||
| onChange={formik.handleChange} | onChange={formik.handleChange} | ||||
| placeholder={intl.formatMessage({id: 'addressLine3'})} | |||||
| placeholder={intl.formatMessage({ id: 'addressLine3' })} | |||||
| inputProps={{ | inputProps={{ | ||||
| onKeyDown: (e) => { | onKeyDown: (e) => { | ||||
| if (e.key === 'Enter') { | if (e.key === 'Enter') { | ||||
| @@ -1175,14 +1175,16 @@ const CustomFormWizard = (props) => { | |||||
| value={selectedAddress4} | value={selectedAddress4} | ||||
| options={ComboData.district} | options={ComboData.district} | ||||
| disabled={checkCountry} | disabled={checkCountry} | ||||
| getOptionLabel={(option) => option.type? intl.formatMessage({ id: option.type }) : ""} | |||||
| getOptionLabel={(option) => option.type ? intl.formatMessage({ id: option.type }) : ""} | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setSelectedAddress4(newValue); | setSelectedAddress4(newValue); | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-root": { height: "41px" }, | |||||
| sx={{ | |||||
| "& .MuiInputBase-root": { height: "41px" }, | |||||
| "#address4-combo": { padding: "0px 0px 0px 3px" }, | "#address4-combo": { padding: "0px 0px 0px 3px" }, | ||||
| "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} | |||||
| renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({id: 'region'})} | |||||
| "& .MuiAutocomplete-endAdornment": { top: "auto" }, | |||||
| }} | |||||
| renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({ id: 'region' })} | |||||
| />} | />} | ||||
| /> | /> | ||||
| <Autocomplete | <Autocomplete | ||||
| @@ -1190,7 +1192,7 @@ const CustomFormWizard = (props) => { | |||||
| id="address5-combo" | id="address5-combo" | ||||
| value={selectedAddress5} | value={selectedAddress5} | ||||
| options={ComboData.country} | options={ComboData.country} | ||||
| getOptionLabel={(option) => option.type? intl.formatMessage({ id: option.type }) : ""} | |||||
| getOptionLabel={(option) => option.type ? intl.formatMessage({ id: option.type }) : ""} | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| if (newValue !== null) { | if (newValue !== null) { | ||||
| setSelectedAddress5(newValue); | setSelectedAddress5(newValue); | ||||
| @@ -1207,7 +1209,7 @@ const CustomFormWizard = (props) => { | |||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address5-combo": { padding: "0px 0px 0px 3px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} | sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address5-combo": { padding: "0px 0px 0px 3px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} | ||||
| renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({id: 'regionOrCountry'})} />} | |||||
| renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({ id: 'regionOrCountry' })} />} | |||||
| /> | /> | ||||
| {formik.touched.address1 && formik.errors.address1 && ( | {formik.touched.address1 && formik.errors.address1 && ( | ||||
| <FormHelperText error id="helper-text-address1-signup"> | <FormHelperText error id="helper-text-address1-signup"> | ||||
| @@ -1229,7 +1231,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} mt={1} mb={1}> | <Grid item xs={12} mt={1} mb={1}> | ||||
| <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | ||||
| <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | ||||
| <FormattedMessage id="yourContact"/> | |||||
| <FormattedMessage id="yourContact" /> | |||||
| </Typography> | </Typography> | ||||
| </Stack> | </Stack> | ||||
| </Grid> | </Grid> | ||||
| @@ -1239,7 +1241,7 @@ const CustomFormWizard = (props) => { | |||||
| <Stack spacing={1} sx={{ mr: { md: 1 }, mb: 1 }}> | <Stack spacing={1} sx={{ mr: { md: 1 }, mb: 1 }}> | ||||
| <InputLabel htmlFor="email-signup"> | <InputLabel htmlFor="email-signup"> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="userContactEmail"/> | |||||
| <FormattedMessage id="userContactEmail" /> | |||||
| <span style={{ color: '#f10000' }}>*</span> | <span style={{ color: '#f10000' }}>*</span> | ||||
| </Typography> | </Typography> | ||||
| </InputLabel> | </InputLabel> | ||||
| @@ -1251,7 +1253,7 @@ const CustomFormWizard = (props) => { | |||||
| value={formik.values.email.trim()} | value={formik.values.email.trim()} | ||||
| name="email" | name="email" | ||||
| onChange={formik.handleChange} | onChange={formik.handleChange} | ||||
| placeholder={intl.formatMessage({id: 'userContactEmail'})} | |||||
| placeholder={intl.formatMessage({ id: 'userContactEmail' })} | |||||
| onBlur={formik.handleBlur} | onBlur={formik.handleBlur} | ||||
| inputProps={{ | inputProps={{ | ||||
| onKeyDown: (e) => { | onKeyDown: (e) => { | ||||
| @@ -1268,7 +1270,7 @@ const CustomFormWizard = (props) => { | |||||
| )} | )} | ||||
| {checkEmail && ( | {checkEmail && ( | ||||
| <FormHelperText error id="helper-text-email-signup"> | <FormHelperText error id="helper-text-email-signup"> | ||||
| <FormattedMessage id="emailUsed"/> | |||||
| <FormattedMessage id="emailUsed" /> | |||||
| </FormHelperText> | </FormHelperText> | ||||
| )} | )} | ||||
| </Stack> | </Stack> | ||||
| @@ -1277,7 +1279,7 @@ const CustomFormWizard = (props) => { | |||||
| <Stack spacing={1} > | <Stack spacing={1} > | ||||
| <InputLabel htmlFor="emailConfirm-signup"> | <InputLabel htmlFor="emailConfirm-signup"> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="userContactEmail"/> | |||||
| <FormattedMessage id="userContactEmail" /> | |||||
| <span style={{ color: '#f10000' }}>*</span> | <span style={{ color: '#f10000' }}>*</span> | ||||
| </Typography> | </Typography> | ||||
| </InputLabel> | </InputLabel> | ||||
| @@ -1290,7 +1292,7 @@ const CustomFormWizard = (props) => { | |||||
| name="emailConfirm" | name="emailConfirm" | ||||
| // onBlur={formik.handleBlur} | // onBlur={formik.handleBlur} | ||||
| onChange={formik.handleChange} | onChange={formik.handleChange} | ||||
| placeholder={intl.formatMessage({id: 'confirmEmail'})} | |||||
| placeholder={intl.formatMessage({ id: 'confirmEmail' })} | |||||
| onBlur={formik.handleBlur} | onBlur={formik.handleBlur} | ||||
| inputProps={{ | inputProps={{ | ||||
| onKeyDown: (e) => { | onKeyDown: (e) => { | ||||
| @@ -1317,7 +1319,7 @@ const CustomFormWizard = (props) => { | |||||
| <Stack direction="column" spacing={1} sx={{ mr: { md: 1 }, mb: 1 }}> | <Stack direction="column" spacing={1} sx={{ mr: { md: 1 }, mb: 1 }}> | ||||
| <InputLabel htmlFor="phone-signup"> | <InputLabel htmlFor="phone-signup"> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="userContactNumber"/> | |||||
| <FormattedMessage id="userContactNumber" /> | |||||
| <span style={{ color: '#f10000' }}>*</span> | <span style={{ color: '#f10000' }}>*</span> | ||||
| </Typography> | </Typography> | ||||
| </InputLabel> | </InputLabel> | ||||
| @@ -1336,7 +1338,7 @@ const CustomFormWizard = (props) => { | |||||
| } | } | ||||
| formik.setFieldValue("phoneCountryCode", value); | formik.setFieldValue("phoneCountryCode", value); | ||||
| }} | }} | ||||
| placeholder={intl.formatMessage({id: 'dialingCode'})} | |||||
| placeholder={intl.formatMessage({ id: 'dialingCode' })} | |||||
| error={Boolean(formik.touched.phone && formik.errors.phone)} | error={Boolean(formik.touched.phone && formik.errors.phone)} | ||||
| onBlur={formik.handleBlur} | onBlur={formik.handleBlur} | ||||
| endAdornment={<InputAdornment position="end">-</InputAdornment>} | endAdornment={<InputAdornment position="end">-</InputAdornment>} | ||||
| @@ -1348,7 +1350,7 @@ const CustomFormWizard = (props) => { | |||||
| } | } | ||||
| }, | }, | ||||
| }} | }} | ||||
| sx={{ width: '33%', mr:1}} | |||||
| sx={{ width: '33%', mr: 1 }} | |||||
| /> | /> | ||||
| <OutlinedInput | <OutlinedInput | ||||
| id="phone-login" | id="phone-login" | ||||
| @@ -1364,7 +1366,7 @@ const CustomFormWizard = (props) => { | |||||
| } | } | ||||
| formik.setFieldValue("phone", value); | formik.setFieldValue("phone", value); | ||||
| }} | }} | ||||
| placeholder={intl.formatMessage({id: 'userContactNumber'})} | |||||
| placeholder={intl.formatMessage({ id: 'userContactNumber' })} | |||||
| error={Boolean(formik.touched.phone && formik.errors.phone)} | error={Boolean(formik.touched.phone && formik.errors.phone)} | ||||
| onBlur={formik.handleBlur} | onBlur={formik.handleBlur} | ||||
| inputProps={{ | inputProps={{ | ||||
| @@ -1393,7 +1395,7 @@ const CustomFormWizard = (props) => { | |||||
| <Stack spacing={1} direction="column"> | <Stack spacing={1} direction="column"> | ||||
| <InputLabel htmlFor="fax-signup"> | <InputLabel htmlFor="fax-signup"> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="userFaxNumber"/> | |||||
| <FormattedMessage id="userFaxNumber" /> | |||||
| </Typography> | </Typography> | ||||
| </InputLabel> | </InputLabel> | ||||
| <Stack direction="row"> | <Stack direction="row"> | ||||
| @@ -1411,7 +1413,7 @@ const CustomFormWizard = (props) => { | |||||
| } | } | ||||
| formik.setFieldValue("faxCountryCode", value); | formik.setFieldValue("faxCountryCode", value); | ||||
| }} | }} | ||||
| placeholder={intl.formatMessage({id: 'dialingCode'})} | |||||
| placeholder={intl.formatMessage({ id: 'dialingCode' })} | |||||
| onBlur={formik.handleBlur} | onBlur={formik.handleBlur} | ||||
| endAdornment={<InputAdornment position="end">-</InputAdornment>} | endAdornment={<InputAdornment position="end">-</InputAdornment>} | ||||
| inputProps={{ | inputProps={{ | ||||
| @@ -1422,7 +1424,7 @@ const CustomFormWizard = (props) => { | |||||
| } | } | ||||
| }, | }, | ||||
| }} | }} | ||||
| sx={{ width: '33%' , mr: 1}} | |||||
| sx={{ width: '33%', mr: 1 }} | |||||
| /> | /> | ||||
| <OutlinedInput | <OutlinedInput | ||||
| id="fax-login" | id="fax-login" | ||||
| @@ -1438,7 +1440,7 @@ const CustomFormWizard = (props) => { | |||||
| } | } | ||||
| formik.setFieldValue("fax", value); | formik.setFieldValue("fax", value); | ||||
| }} | }} | ||||
| placeholder={intl.formatMessage({id: 'userFaxNumber'})} | |||||
| placeholder={intl.formatMessage({ id: 'userFaxNumber' })} | |||||
| inputProps={{ | inputProps={{ | ||||
| maxLength: 8, | maxLength: 8, | ||||
| onKeyDown: (e) => { | onKeyDown: (e) => { | ||||
| @@ -1461,28 +1463,28 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} md={12}> | <Grid item xs={12} md={12}> | ||||
| <Stack spacing={1} direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | <Stack spacing={1} direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | ||||
| <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | ||||
| <FormattedMessage id="userIdDoc"/> | |||||
| <FormattedMessage id="userIdDoc" /> | |||||
| <span style={{ color: '#f10000' }}>*</span></Typography> | <span style={{ color: '#f10000' }}>*</span></Typography> | ||||
| <Typography display="inline" variant="subtitle1" sx={{ color: 'primary.primary' }}> | <Typography display="inline" variant="subtitle1" sx={{ color: 'primary.primary' }}> | ||||
| <FormattedMessage id="pleaseUploadIdDoc"/> | |||||
| <FormattedMessage id="pleaseUploadIdDoc" /> | |||||
| </Typography> | </Typography> | ||||
| <Typography display="inline" variant="subtitle1" sx={{ color: 'primary.primary' }}> | <Typography display="inline" variant="subtitle1" sx={{ color: 'primary.primary' }}> | ||||
| <FormattedMessage id="pleaseUploadIdDocSubTitle"/> | |||||
| <FormattedMessage id="pleaseUploadIdDocSubTitle" /> | |||||
| </Typography> | </Typography> | ||||
| <Stack mt={1} direction="row" justifyContent="flex-start" alignItems="center" spacing={2}> | <Stack mt={1} direction="row" justifyContent="flex-start" alignItems="center" spacing={2}> | ||||
| <ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | <ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | ||||
| <Button variant="contained" component="label" sx={{ height: '40px' }}> | |||||
| <FormattedMessage id="uploadIdDoc"/> | |||||
| <input | |||||
| accept="image/png, .jpg, .bmp, .pdf" | |||||
| //className={classes.input} | |||||
| id="contained-button-file" | |||||
| multiple | |||||
| type="file" | |||||
| onChange={handleFileUpload} | |||||
| style={{ display: 'none' }} | |||||
| /> | |||||
| </Button> | |||||
| <Button variant="contained" component="label" sx={{ height: '40px' }}> | |||||
| <FormattedMessage id="uploadIdDoc" /> | |||||
| <input | |||||
| accept="image/png, .jpg, .bmp, .pdf" | |||||
| //className={classes.input} | |||||
| id="contained-button-file" | |||||
| multiple | |||||
| type="file" | |||||
| onChange={handleFileUpload} | |||||
| style={{ display: 'none' }} | |||||
| /> | |||||
| </Button> | |||||
| </ThemeProvider> | </ThemeProvider> | ||||
| {/*<Typography xs={12} sm={9} md={3} display="inline" variant="subtitle1" sx={{ color: 'primary.primary' }}>如: 香港身份證; 護照; 中國內地身份證等</Typography>*/} | {/*<Typography xs={12} sm={9} md={3} display="inline" variant="subtitle1" sx={{ color: 'primary.primary' }}>如: 香港身份證; 護照; 中國內地身份證等</Typography>*/} | ||||
| </Stack> | </Stack> | ||||
| @@ -1501,7 +1503,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid container> | <Grid container> | ||||
| <Grid item xs={12} md={12}> | <Grid item xs={12} md={12}> | ||||
| <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | ||||
| <FormattedMessage id="termsAndCondition"/> | |||||
| <FormattedMessage id="termsAndCondition" /> | |||||
| <span style={{ color: '#f10000' }}>*</span> | <span style={{ color: '#f10000' }}>*</span> | ||||
| </Typography> | </Typography> | ||||
| </Grid> | </Grid> | ||||
| @@ -1526,7 +1528,7 @@ const CustomFormWizard = (props) => { | |||||
| size="small" | size="small" | ||||
| /> | /> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="acceptTerms"/> | |||||
| <FormattedMessage id="acceptTerms" /> | |||||
| </Typography> | </Typography> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -1542,7 +1544,7 @@ const CustomFormWizard = (props) => { | |||||
| size="small" | size="small" | ||||
| /> | /> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="rejectTerms"/> | |||||
| <FormattedMessage id="rejectTerms" /> | |||||
| </Typography> | </Typography> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -1556,7 +1558,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid container> | <Grid container> | ||||
| <Stack direction="column"> | <Stack direction="column"> | ||||
| <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | ||||
| <FormattedMessage id="verify"/> | |||||
| <FormattedMessage id="verify" /> | |||||
| <span style={{ color: '#f10000' }}>*</span> | <span style={{ color: '#f10000' }}>*</span> | ||||
| </Typography> | </Typography> | ||||
| <Stack spacing={1} direction="row"> | <Stack spacing={1} direction="row"> | ||||
| @@ -1604,12 +1606,12 @@ const CustomFormWizard = (props) => { | |||||
| <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | ||||
| <div style={{ borderBottom: "3px solid #1A4399", width: "100%", margin_right: "15px" }}> | <div style={{ borderBottom: "3px solid #1A4399", width: "100%", margin_right: "15px" }}> | ||||
| <Typography display="inline" variant="h3" sx={{ color: '#1A4399' }}> | <Typography display="inline" variant="h3" sx={{ color: '#1A4399' }}> | ||||
| <FormattedMessage id="becomeNewPersonalUser"/> | |||||
| <FormattedMessage id="becomeNewPersonalUser" /> | |||||
| </Typography> | </Typography> | ||||
| </div> | </div> | ||||
| {/* <Typography mt={0.25} variant="h6" sx={{ fontSize: 12,color: '#f10000'}}>註有*的項目必須輸入資料</Typography> */} | {/* <Typography mt={0.25} variant="h6" sx={{ fontSize: 12,color: '#f10000'}}>註有*的項目必須輸入資料</Typography> */} | ||||
| <Typography mt={0.25} variant="h4" sx={{ color: 'primary.primary' }}> | <Typography mt={0.25} variant="h4" sx={{ color: 'primary.primary' }}> | ||||
| <FormattedMessage id="yourLoginInformation"/> | |||||
| <FormattedMessage id="yourLoginInformation" /> | |||||
| </Typography> | </Typography> | ||||
| {/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | {/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | ||||
| Already have an account? | Already have an account? | ||||
| @@ -1621,7 +1623,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} > | <Grid item xs={12} > | ||||
| <Stack spacing={2} direction="row"> | <Stack spacing={2} direction="row"> | ||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | ||||
| <FormattedMessage id="userLoginName"/>: | |||||
| <FormattedMessage id="userLoginName" />: | |||||
| </Typography> | </Typography> | ||||
| <Typography variant="pnspsFormHeader" id="preview-username-login"> | <Typography variant="pnspsFormHeader" id="preview-username-login"> | ||||
| {formik.values.username} | {formik.values.username} | ||||
| @@ -1631,7 +1633,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} mt={1} mb={1}> | <Grid item xs={12} mt={1} mb={1}> | ||||
| <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | ||||
| <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | ||||
| <FormattedMessage id="yourPersonalInformation"/> | |||||
| <FormattedMessage id="yourPersonalInformation" /> | |||||
| </Typography> | </Typography> | ||||
| {/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | {/* <Typography component={Link} to="/login" variant="body1" sx={{ textDecoration: 'none' }} color="primary"> | ||||
| Already have an account? | Already have an account? | ||||
| @@ -1641,7 +1643,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} md={12} > | <Grid item xs={12} md={12} > | ||||
| <Stack spacing={1}> | <Stack spacing={1}> | ||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | ||||
| <FormattedMessage id="userIdDoc"/> | |||||
| <FormattedMessage id="userIdDoc" /> | |||||
| </Typography> | </Typography> | ||||
| </Stack> | </Stack> | ||||
| </Grid> | </Grid> | ||||
| @@ -1649,17 +1651,18 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} md={6} > | <Grid item xs={12} md={6} > | ||||
| <Stack spacing={1} direction="row"> | <Stack spacing={1} direction="row"> | ||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | ||||
| <FormattedMessage id="idDocType"/>: | |||||
| <FormattedMessage id="idDocType" />: | |||||
| </Typography> | </Typography> | ||||
| <Typography variant="pnspsFormHeader" name="preview-idDocType"> | <Typography variant="pnspsFormHeader" name="preview-idDocType"> | ||||
| {selectedIdDocType.label} | |||||
| {intl.formatMessage({ id: selectedIdDocType?.label??" " })} | |||||
| </Typography> | </Typography> | ||||
| </Stack> | </Stack> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={6}> | <Grid item xs={12} md={6}> | ||||
| <Stack spacing={1} direction="row"> | <Stack spacing={1} direction="row"> | ||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | ||||
| <FormattedMessage id="idDocNumber"/>: | |||||
| <FormattedMessage id="idDocNumber" />: | |||||
| </Typography> | </Typography> | ||||
| <Typography variant="pnspsFormHeader" id="idNo-login"> | <Typography variant="pnspsFormHeader" id="idNo-login"> | ||||
| {formik.values.idNo} {selectedIdDocType.type == "HKID" ? '(' + formik.values.checkDigit + ')' : null} | {formik.values.idNo} {selectedIdDocType.type == "HKID" ? '(' + formik.values.checkDigit + ')' : null} | ||||
| @@ -1670,7 +1673,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} md={6}> | <Grid item xs={12} md={6}> | ||||
| <Stack spacing={1} direction="row"> | <Stack spacing={1} direction="row"> | ||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | ||||
| <FormattedMessage id="userEnglishName"/>: | |||||
| <FormattedMessage id="userEnglishName" />: | |||||
| </Typography> | </Typography> | ||||
| <Typography variant="pnspsFormHeader" id="preview-enName-signup"> | <Typography variant="pnspsFormHeader" id="preview-enName-signup"> | ||||
| {formik.values.enName} | {formik.values.enName} | ||||
| @@ -1680,7 +1683,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} md={6}> | <Grid item xs={12} md={6}> | ||||
| <Stack spacing={1} direction="row"> | <Stack spacing={1} direction="row"> | ||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | ||||
| <FormattedMessage id="userChineseName"/>: | |||||
| <FormattedMessage id="userChineseName" />: | |||||
| </Typography> | </Typography> | ||||
| <Typography variant="pnspsFormHeader" id="preview-chName-signup"> | <Typography variant="pnspsFormHeader" id="preview-chName-signup"> | ||||
| {formik.values.chName} | {formik.values.chName} | ||||
| @@ -1690,7 +1693,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12}> | <Grid item xs={12}> | ||||
| <Stack spacing={1} direction="row"> | <Stack spacing={1} direction="row"> | ||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | ||||
| <FormattedMessage id="formAddress"/>: | |||||
| <FormattedMessage id="formAddress" />: | |||||
| </Typography> | </Typography> | ||||
| <Stack spacing={1} direction="column"> | <Stack spacing={1} direction="column"> | ||||
| <Typography variant="pnspsFormHeader" id="preview-address1-signup"> | <Typography variant="pnspsFormHeader" id="preview-address1-signup"> | ||||
| @@ -1709,19 +1712,19 @@ const CustomFormWizard = (props) => { | |||||
| {selectedAddress5.label === "hongKong" ? | {selectedAddress5.label === "hongKong" ? | ||||
| <Stack direction="row"> | <Stack direction="row"> | ||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]} id="preview-address4-signup"> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]} id="preview-address4-signup"> | ||||
| <FormattedMessage id="region"/>: | |||||
| <FormattedMessage id="region" />: | |||||
| </Typography> | </Typography> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| {!selectedAddress4? "" : intl.formatMessage({id: selectedAddress4.type})} | |||||
| {!selectedAddress4 ? "" : intl.formatMessage({ id: selectedAddress4.type })} | |||||
| </Typography> | </Typography> | ||||
| </Stack> | </Stack> | ||||
| : null} | : null} | ||||
| <Stack direction="row"> | <Stack direction="row"> | ||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]} id="preview-address5-signup"> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]} id="preview-address5-signup"> | ||||
| <FormattedMessage id="regionOrCountry"/>: | |||||
| <FormattedMessage id="regionOrCountry" />: | |||||
| </Typography> | </Typography> | ||||
| <Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
| {intl.formatMessage({id: selectedAddress5.type})} | |||||
| {intl.formatMessage({ id: selectedAddress5.type })} | |||||
| </Typography> | </Typography> | ||||
| </Stack> | </Stack> | ||||
| </Stack> | </Stack> | ||||
| @@ -1730,14 +1733,14 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} mt={1} mb={1}> | <Grid item xs={12} mt={1} mb={1}> | ||||
| <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | <Stack direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | ||||
| <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | ||||
| <FormattedMessage id="yourContact"/> | |||||
| <FormattedMessage id="yourContact" /> | |||||
| </Typography> | </Typography> | ||||
| </Stack> | </Stack> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={12}> | <Grid item xs={12} md={12}> | ||||
| <Stack spacing={1} direction="row"> | <Stack spacing={1} direction="row"> | ||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | ||||
| <FormattedMessage id="userContactEmail"/>: | |||||
| <FormattedMessage id="userContactEmail" />: | |||||
| </Typography> | </Typography> | ||||
| <Typography variant="pnspsFormHeader" id="preview-email-signup"> | <Typography variant="pnspsFormHeader" id="preview-email-signup"> | ||||
| {formik.values.email} | {formik.values.email} | ||||
| @@ -1747,7 +1750,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} md={6}> | <Grid item xs={12} md={6}> | ||||
| <Stack spacing={1} direction="row"> | <Stack spacing={1} direction="row"> | ||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | ||||
| <FormattedMessage id="userContactNumber"/>: | |||||
| <FormattedMessage id="userContactNumber" />: | |||||
| </Typography> | </Typography> | ||||
| <Typography variant="pnspsFormHeader" id="preview-phone-signup"> | <Typography variant="pnspsFormHeader" id="preview-phone-signup"> | ||||
| +{formik.values.phoneCountryCode} {formik.values.phone} | +{formik.values.phoneCountryCode} {formik.values.phone} | ||||
| @@ -1758,7 +1761,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} md={6}> | <Grid item xs={12} md={6}> | ||||
| <Stack spacing={1} direction="row"> | <Stack spacing={1} direction="row"> | ||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | ||||
| <FormattedMessage id="userFaxNumber"/>: | |||||
| <FormattedMessage id="userFaxNumber" />: | |||||
| </Typography> | </Typography> | ||||
| <Typography variant="pnspsFormHeader" id="preview-fax-signup"> | <Typography variant="pnspsFormHeader" id="preview-fax-signup"> | ||||
| +{formik.values.faxCountryCode} {formik.values.fax} | +{formik.values.faxCountryCode} {formik.values.fax} | ||||
| @@ -1771,7 +1774,7 @@ const CustomFormWizard = (props) => { | |||||
| <Grid item xs={12} md={12}> | <Grid item xs={12} md={12}> | ||||
| <Stack spacing={1} direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | <Stack spacing={1} direction="column" justifyContent="space-between" alignItems="baseline" sx={{ mb: { xs: -0.5, sm: 0.5 } }}> | ||||
| <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | <Typography display="inline" variant="h4" sx={{ color: 'primary.primary' }}> | ||||
| <FormattedMessage id="userIdDoc"/> | |||||
| <FormattedMessage id="userIdDoc" /> | |||||
| </Typography> | </Typography> | ||||
| {fileList != null ? | {fileList != null ? | ||||
| <PreviewUploadFileTable key="previewTable" recordList={fileListData} /> : null} | <PreviewUploadFileTable key="previewTable" recordList={fileListData} /> : null} | ||||
| @@ -1794,13 +1797,13 @@ const CustomFormWizard = (props) => { | |||||
| <Stack mt={1} direction="column" justifyContent="flex-start" alignItems="center" spacing={2}> | <Stack mt={1} direction="column" justifyContent="flex-start" alignItems="center" spacing={2}> | ||||
| <CheckCircleOutlineIcon color="success" sx={{ width: "200px", height: "200px" }} /> | <CheckCircleOutlineIcon color="success" sx={{ width: "200px", height: "200px" }} /> | ||||
| <Typography display="inline" variant="h4"> | <Typography display="inline" variant="h4"> | ||||
| <FormattedMessage id="registerSubmitted"/> | |||||
| <FormattedMessage id="registerSubmitted" /> | |||||
| </Typography> | </Typography> | ||||
| <Typography display="inline" variant="h4"> | <Typography display="inline" variant="h4"> | ||||
| <FormattedMessage id="emailSent"/> | |||||
| <FormattedMessage id="emailSent" /> | |||||
| </Typography> | </Typography> | ||||
| <Button variant="outlined" component={Link} to="/login" ><Typography variant="pnspsFormHeader"> | <Button variant="outlined" component={Link} to="/login" ><Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="backToLogin"/> | |||||
| <FormattedMessage id="backToLogin" /> | |||||
| </Typography></Button> | </Typography></Button> | ||||
| </Stack> | </Stack> | ||||
| : | : | ||||
| @@ -1812,7 +1815,7 @@ const CustomFormWizard = (props) => { | |||||
| <FormattedMessage id="registerFail" /> | <FormattedMessage id="registerFail" /> | ||||
| </Typography> | </Typography> | ||||
| <Button color="error" variant="outlined" component={Link} to="/login" ><Typography variant="pnspsFormHeader"> | <Button color="error" variant="outlined" component={Link} to="/login" ><Typography variant="pnspsFormHeader"> | ||||
| <FormattedMessage id="backToLogin"/> | |||||
| <FormattedMessage id="backToLogin" /> | |||||
| </Typography></Button> | </Typography></Button> | ||||
| </Stack> | </Stack> | ||||
| } | } | ||||