Mobile registration optimizations and tests (#62)
* Mobile registration optimizations - don't autocaptialize or autocorrect on username field - show each password field in their own row - improve position of tooltip on mobile so that it's visible * Use optional prop rather than default prop. * Redirect to welcome screen if mobile_registration is requested but not enabled in the config. * autocorrect value should be "off" * Add unit tests for mobile registration * Fix test typo * Fix typo
This commit is contained in:
parent
4be533813e
commit
1f5571062e
9 changed files with 142 additions and 19 deletions
|
@ -12,6 +12,7 @@ import Field, { IInputProps } from "../elements/Field";
|
|||
import { _t, _td, TranslationKey } from "../../../languageHandler";
|
||||
import withValidation, { IFieldState, IValidationResult } from "../elements/Validation";
|
||||
import * as Email from "../../../email";
|
||||
import { Alignment } from "../elements/Tooltip";
|
||||
|
||||
interface IProps extends Omit<IInputProps, "onValidate" | "element"> {
|
||||
id?: string;
|
||||
|
@ -22,6 +23,7 @@ interface IProps extends Omit<IInputProps, "onValidate" | "element"> {
|
|||
label: TranslationKey;
|
||||
labelRequired: TranslationKey;
|
||||
labelInvalid: TranslationKey;
|
||||
tooltipAlignment?: Alignment;
|
||||
|
||||
// When present, completely overrides the default validation rules.
|
||||
validationRules?: (fieldState: IFieldState) => Promise<IValidationResult>;
|
||||
|
@ -77,6 +79,7 @@ class EmailField extends PureComponent<IProps> {
|
|||
autoFocus={this.props.autoFocus}
|
||||
onChange={this.props.onChange}
|
||||
onValidate={this.onValidate}
|
||||
tooltipAlignment={this.props.tooltipAlignment}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue