dquote> - updated registartion page, added gdpr and marketing checkboxes;
dquote> - fixed number input; dquote> - updated latest submissions table component;
This commit is contained in:
@@ -9,7 +9,7 @@ import { useSearchParams } from 'react-router-dom';
|
||||
import AuthenticationService from '../../service/authentication-service';
|
||||
|
||||
// tools
|
||||
import { isCodiceFiscale, isEmail } from '../../helpers/validators';
|
||||
import { isEmail } from '../../helpers/validators';
|
||||
|
||||
// store
|
||||
import { storeSet, useStore } from '../../store';
|
||||
@@ -19,6 +19,7 @@ import FormField from '../../components/FormField';
|
||||
import LogoIcon from '../../icons/LogoIcon';
|
||||
import { Button } from 'primereact/button';
|
||||
import { Messages } from 'primereact/messages';
|
||||
import { Panel } from 'primereact/panel';
|
||||
|
||||
const Registration = () => {
|
||||
const token = useStore().main.token();
|
||||
@@ -29,8 +30,10 @@ const Registration = () => {
|
||||
control,
|
||||
handleSubmit,
|
||||
formState: { errors },
|
||||
setValue
|
||||
setValue,
|
||||
getValues
|
||||
} = useForm({ mode: 'onChange' });
|
||||
const values = getValues();
|
||||
|
||||
const onSubmit = (formData) => {
|
||||
errorMsgs.current.clear();
|
||||
@@ -100,6 +103,18 @@ const Registration = () => {
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
const disableAllChecks = () => {
|
||||
setValue('marketing1', false);
|
||||
setValue('marketing2', false);
|
||||
setValue('marketing3', false);
|
||||
}
|
||||
|
||||
const enableAllChecks = () => {
|
||||
setValue('marketing1', true);
|
||||
setValue('marketing2', true);
|
||||
setValue('marketing3', true);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (!isEmpty(token)) {
|
||||
setLoading(true);
|
||||
@@ -207,6 +222,130 @@ const Registration = () => {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Panel
|
||||
headerTemplate={(options) => {
|
||||
return (
|
||||
<div className={classNames(['p-panel-header', 'reverseSwitchField'])}>
|
||||
<FormField
|
||||
type="switch"
|
||||
fieldName="privacy"
|
||||
label={__('Ho letto e accetto l’Informativa sulla Privacy (Necessario)', 'gepafin')}
|
||||
control={control}
|
||||
errors={errors}
|
||||
defaultValue={values['privacy']}
|
||||
onLabel={''}
|
||||
offLabel={''}
|
||||
config={{
|
||||
required: __('È obbligatorio', 'gepafin'),
|
||||
}}
|
||||
/>
|
||||
<div>
|
||||
{options.togglerElement}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
toggleable>
|
||||
<p className="m-0">
|
||||
{__('Dichiaro di aver preso visione, prima dell\'accesso al portale https://bandi.gepafin.it, dell\' "Informativa Privacy" all\'interno dell\'Appendice 10 dell\'Avviso secondo il Regolamento UE 2016/679 relativo alla protezione delle persone fisiche con riguardo al trattamento dei dati personale, nonché alla libera circolazione di tali dati e che abroga la Direttiva 95/46 CE.', 'gepafin')}
|
||||
</p>
|
||||
</Panel>
|
||||
|
||||
<Panel
|
||||
headerTemplate={(options) => {
|
||||
return (
|
||||
<div className={classNames(['p-panel-header', 'reverseSwitchField'])}>
|
||||
<FormField
|
||||
type="switch"
|
||||
fieldName="terms"
|
||||
label={__('Ho letto e accetto Termini e condizioni (Necessario)', 'gepafin')}
|
||||
control={control}
|
||||
errors={errors}
|
||||
defaultValue={values['terms']}
|
||||
onLabel={''}
|
||||
offLabel={''}
|
||||
config={{
|
||||
required: __('È obbligatorio', 'gepafin'),
|
||||
}}
|
||||
/>
|
||||
<div>
|
||||
{options.togglerElement}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
toggleable>
|
||||
<p className="m-0">
|
||||
{__('Termini e condizioni', 'gepafin')}
|
||||
</p>
|
||||
</Panel>
|
||||
|
||||
<Panel
|
||||
header={__('Altri consensi (facoltativo)', 'gepafin')}
|
||||
toggleable>
|
||||
<div className="appForm__col">
|
||||
<div className={classNames(['appForm__row', 'reverseSwitchField'])}>
|
||||
<FormField
|
||||
type="switch"
|
||||
fieldName="marketing"
|
||||
label={''}
|
||||
control={control}
|
||||
errors={errors}
|
||||
defaultValue={values['marketing']}
|
||||
onLabel={''}
|
||||
offLabel={''}
|
||||
/>
|
||||
<div>
|
||||
{__('Invio di materiale pubblicitario, vendita diretta, compimento di ricerche di mercato o comunicazione commerciale riguardanti promozione e vendita di prodotti e servizi della Gepafin, mediante modalità di contatto automatizzate (posta elettronica, PEC, messaggi tramite canali informatici, network ed applicazioni web) e tradizionali (come posta cartacea e chiamate telefoniche con operatore)', 'gepafin')}
|
||||
</div>
|
||||
</div>
|
||||
<div className={classNames(['appForm__row', 'reverseSwitchField'])}>
|
||||
<FormField
|
||||
type="switch"
|
||||
fieldName="offers"
|
||||
label={''}
|
||||
control={control}
|
||||
errors={errors}
|
||||
defaultValue={values['offers']}
|
||||
onLabel={''}
|
||||
offLabel={''}
|
||||
/>
|
||||
<div>
|
||||
{__('Elaborazione, in forma elettronica, dei dati relativi ai rapporti e servizi forniti, per l’analisi di comportamenti e preferenze della clientela, da utilizzare a scopo commerciale, per la individuazione ed offerta di prodotti e servizi di suo interesse', 'gepafin')}
|
||||
</div>
|
||||
</div>
|
||||
<div className={classNames(['appForm__row', 'reverseSwitchField'])}>
|
||||
<FormField
|
||||
type="switch"
|
||||
fieldName="thirdparty"
|
||||
label={''}
|
||||
control={control}
|
||||
errors={errors}
|
||||
defaultValue={values['thirdparty']}
|
||||
onLabel={''}
|
||||
offLabel={''}
|
||||
/>
|
||||
<div>
|
||||
{__('Comunicazione dei miei dati ad altre società in ambito bancario, finanziario od assicurativo e enti pubblici che li tratteranno per invio di materiale pubblicitario, vendita diretta, compimento di ricerche di mercato o comunicazione commerciale riguardanti loro prodotti o servizi, mediante le modalità automatizzate e tradizionali di comunicazione sopra indicate', 'gepafin')}
|
||||
</div>
|
||||
</div>
|
||||
<div className="appForm__cols">
|
||||
<Button
|
||||
type="button"
|
||||
severity="info"
|
||||
onClick={disableAllChecks}
|
||||
outlined
|
||||
label={__('Nega tutti', 'gepafin')}/>
|
||||
|
||||
<Button
|
||||
type="button"
|
||||
severity="info"
|
||||
onClick={enableAllChecks}
|
||||
label={__('Attiva tutti', 'gepafin')}/>
|
||||
</div>
|
||||
</div>
|
||||
</Panel>
|
||||
|
||||
<Button
|
||||
label={__('Accedi', 'gepafin')}
|
||||
disabled={loading}/>
|
||||
|
||||
Reference in New Issue
Block a user