Disable spellcheck for PII fields (#2416)

This commit is contained in:
Krzysztof Żuraw 2022-10-31 11:37:07 +01:00 committed by GitHub
parent 802524744b
commit cac3e43702
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 237 additions and 0 deletions

View file

@ -77,6 +77,7 @@ const LoginCard: React.FC<LoginCardProps> = props => {
value={data.email} value={data.email}
inputProps={{ inputProps={{
"data-test-id": "email", "data-test-id": "email",
spellCheck: false,
}} }}
disabled={disabled} disabled={disabled}
/> />
@ -95,6 +96,7 @@ const LoginCard: React.FC<LoginCardProps> = props => {
value={data.password} value={data.password}
inputProps={{ inputProps={{
"data-test-id": "password", "data-test-id": "password",
spellCheck: false,
}} }}
disabled={disabled} disabled={disabled}
/> />

View file

@ -76,6 +76,7 @@ const NewPasswordPage: React.FC<NewPasswordPageProps> = props => {
value={data.password} value={data.password}
inputProps={{ inputProps={{
"data-test-id": "password", "data-test-id": "password",
spellCheck: false,
}} }}
required required
/> />
@ -102,6 +103,7 @@ const NewPasswordPage: React.FC<NewPasswordPageProps> = props => {
} }
inputProps={{ inputProps={{
"data-test-id": "confirm-password", "data-test-id": "confirm-password",
spellCheck: false,
}} }}
required required
/> />

View file

@ -61,6 +61,7 @@ const ResetPasswordPage: React.FC<ResetPasswordPageProps> = props => {
value={data.email} value={data.email}
inputProps={{ inputProps={{
"data-test-id": "email", "data-test-id": "email",
spellCheck: false,
}} }}
/> />
<FormSpacer /> <FormSpacer />

View file

@ -96,6 +96,7 @@ const AddressEdit: React.FC<AddressEditProps> = props => {
// Setting 'autoComplete: "new-password"' is the only way to // Setting 'autoComplete: "new-password"' is the only way to
// disable Chrome's autofill on forms as of early 2022 // disable Chrome's autofill on forms as of early 2022
autoComplete: "new-password", autoComplete: "new-password",
spellCheck: false,
}} }}
/> />
</div> </div>
@ -111,6 +112,7 @@ const AddressEdit: React.FC<AddressEditProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "new-password", autoComplete: "new-password",
spellCheck: false,
}} }}
/> />
</div> </div>
@ -132,6 +134,7 @@ const AddressEdit: React.FC<AddressEditProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "new-password", autoComplete: "new-password",
spellCheck: false,
}} }}
/> />
</div> </div>
@ -150,6 +153,7 @@ const AddressEdit: React.FC<AddressEditProps> = props => {
onChange={onChange} onChange={onChange}
InputProps={{ InputProps={{
autoComplete: "new-password", autoComplete: "new-password",
spellCheck: false,
}} }}
/> />
</div> </div>
@ -169,6 +173,7 @@ const AddressEdit: React.FC<AddressEditProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "new-password", autoComplete: "new-password",
spellCheck: false,
}} }}
/> />
<FormSpacer /> <FormSpacer />
@ -186,6 +191,7 @@ const AddressEdit: React.FC<AddressEditProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "new-password", autoComplete: "new-password",
spellCheck: false,
}} }}
/> />
<FormSpacer /> <FormSpacer />
@ -205,6 +211,7 @@ const AddressEdit: React.FC<AddressEditProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "new-password", autoComplete: "new-password",
spellCheck: false,
}} }}
/> />
</div> </div>
@ -223,6 +230,7 @@ const AddressEdit: React.FC<AddressEditProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "new-password", autoComplete: "new-password",
spellCheck: false,
}} }}
/> />
</div> </div>
@ -245,6 +253,9 @@ const AddressEdit: React.FC<AddressEditProps> = props => {
onChange={onCountryChange} onChange={onCountryChange}
value={data.country} value={data.country}
choices={countries} choices={countries}
InputProps={{
spellCheck: false,
}}
/> />
</div> </div>
<div> <div>
@ -262,6 +273,7 @@ const AddressEdit: React.FC<AddressEditProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "new-password", autoComplete: "new-password",
spellCheck: false,
}} }}
/> />
</div> </div>

View file

@ -95,6 +95,7 @@ const CompanyAddressForm: React.FC<CompanyAddressFormProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "organization", autoComplete: "organization",
spellCheck: false,
}} }}
/> />
<FormSpacer /> <FormSpacer />
@ -112,6 +113,7 @@ const CompanyAddressForm: React.FC<CompanyAddressFormProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "address-line1", autoComplete: "address-line1",
spellCheck: false,
}} }}
/> />
<FormSpacer /> <FormSpacer />
@ -129,6 +131,7 @@ const CompanyAddressForm: React.FC<CompanyAddressFormProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "address-line2", autoComplete: "address-line2",
spellCheck: false,
}} }}
/> />
<FormSpacer /> <FormSpacer />
@ -147,6 +150,7 @@ const CompanyAddressForm: React.FC<CompanyAddressFormProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "address-level2", autoComplete: "address-level2",
spellCheck: false,
}} }}
/> />
<TextField <TextField
@ -163,6 +167,7 @@ const CompanyAddressForm: React.FC<CompanyAddressFormProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "postal-code", autoComplete: "postal-code",
spellCheck: false,
}} }}
/> />
</Grid> </Grid>
@ -182,6 +187,9 @@ const CompanyAddressForm: React.FC<CompanyAddressFormProps> = props => {
onChange={onCountryChange} onChange={onCountryChange}
value={data.country} value={data.country}
choices={countries} choices={countries}
InputProps={{
spellCheck: false,
}}
/> />
<TextField <TextField
disabled={disabled} disabled={disabled}
@ -197,6 +205,7 @@ const CompanyAddressForm: React.FC<CompanyAddressFormProps> = props => {
fullWidth fullWidth
InputProps={{ InputProps={{
autoComplete: "address-level1", autoComplete: "address-level1",
spellCheck: false,
}} }}
/> />
</Grid> </Grid>
@ -215,6 +224,7 @@ const CompanyAddressForm: React.FC<CompanyAddressFormProps> = props => {
onChange={onChange} onChange={onChange}
InputProps={{ InputProps={{
autoComplete: "tel", autoComplete: "tel",
spellCheck: false,
}} }}
/> />
</div> </div>

View file

@ -64,6 +64,9 @@ const CustomerCreateDetails: React.FC<CustomerCreateDetailsProps> = props => {
type="text" type="text"
value={data.customerFirstName} value={data.customerFirstName}
onChange={onChange} onChange={onChange}
inputProps={{
spellCheck: false,
}}
/> />
<TextField <TextField
disabled={disabled} disabled={disabled}
@ -78,6 +81,9 @@ const CustomerCreateDetails: React.FC<CustomerCreateDetailsProps> = props => {
type="text" type="text"
value={data.customerLastName} value={data.customerLastName}
onChange={onChange} onChange={onChange}
inputProps={{
spellCheck: false,
}}
/> />
<TextField <TextField
disabled={disabled} disabled={disabled}
@ -89,6 +95,9 @@ const CustomerCreateDetails: React.FC<CustomerCreateDetailsProps> = props => {
type="email" type="email"
value={data.email} value={data.email}
onChange={onChange} onChange={onChange}
inputProps={{
spellCheck: false,
}}
/> />
</div> </div>
</CardContent> </CardContent>

View file

@ -70,6 +70,9 @@ const CustomerInfo: React.FC<CustomerInfoProps> = props => {
label={intl.formatMessage(commonMessages.firstName)} label={intl.formatMessage(commonMessages.firstName)}
value={data.firstName} value={data.firstName}
onChange={onChange} onChange={onChange}
inputProps={{
spellCheck: false,
}}
/> />
<TextField <TextField
disabled={disabled} disabled={disabled}
@ -81,6 +84,9 @@ const CustomerInfo: React.FC<CustomerInfoProps> = props => {
label={intl.formatMessage(commonMessages.lastName)} label={intl.formatMessage(commonMessages.lastName)}
value={data.lastName} value={data.lastName}
onChange={onChange} onChange={onChange}
inputProps={{
spellCheck: false,
}}
/> />
</Grid> </Grid>
<Hr className={classes.hr} /> <Hr className={classes.hr} />
@ -101,6 +107,9 @@ const CustomerInfo: React.FC<CustomerInfoProps> = props => {
label={intl.formatMessage(commonMessages.email)} label={intl.formatMessage(commonMessages.email)}
value={data.email} value={data.email}
onChange={onChange} onChange={onChange}
inputProps={{
spellCheck: false,
}}
/> />
</CardContent> </CardContent>
</Card> </Card>

View file

@ -78,6 +78,9 @@ const StaffPasswordResetDialog: React.FC<StaffPasswordResetDialogProps> = ({
name="oldPassword" name="oldPassword"
type="password" type="password"
onChange={change} onChange={change}
inputProps={{
spellCheck: false,
}}
/> />
<FormSpacer /> <FormSpacer />
<TextField <TextField
@ -99,6 +102,9 @@ const StaffPasswordResetDialog: React.FC<StaffPasswordResetDialogProps> = ({
name="newPassword" name="newPassword"
type="password" type="password"
onChange={change} onChange={change}
inputProps={{
spellCheck: false,
}}
/> />
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>

View file

@ -212,6 +212,9 @@ const StaffProperties: React.FC<StaffPropertiesProps> = props => {
{...getFieldProps("firstName")} {...getFieldProps("firstName")}
onChange={onChange} onChange={onChange}
fullWidth fullWidth
inputProps={{
spellCheck: false,
}}
/> />
</div> </div>
<div className={classes.prop}> <div className={classes.prop}>
@ -219,6 +222,9 @@ const StaffProperties: React.FC<StaffPropertiesProps> = props => {
{...getFieldProps("lastName")} {...getFieldProps("lastName")}
onChange={onChange} onChange={onChange}
fullWidth fullWidth
inputProps={{
spellCheck: false,
}}
/> />
</div> </div>
<div className={classes.prop}> <div className={classes.prop}>
@ -226,6 +232,9 @@ const StaffProperties: React.FC<StaffPropertiesProps> = props => {
{...getFieldProps("email")} {...getFieldProps("email")}
onChange={onChange} onChange={onChange}
fullWidth fullWidth
inputProps={{
spellCheck: false,
}}
/> />
</div> </div>
</div> </div>

File diff suppressed because it is too large Load diff