diff --git a/src/pages/SetPasswordPage.js b/src/pages/SetPasswordPage.js
index 2e4b9e89d983..8309ad5bd728 100644
--- a/src/pages/SetPasswordPage.js
+++ b/src/pages/SetPasswordPage.js
@@ -11,11 +11,12 @@ import _ from 'underscore';
import lodashGet from 'lodash/get';
import validateLinkPropTypes from './validateLinkPropTypes';
import styles from '../styles/styles';
-import ExpensifyCashLogo from '../components/ExpensifyCashLogo';
import {setPassword} from '../libs/actions/Session';
import ONYXKEYS from '../ONYXKEYS';
-import variables from '../styles/variables';
import ButtonWithLoader from '../components/ButtonWithLoader';
+import themeColors from '../styles/themes/default';
+import SignInPageLayout from './signin/SignInPageLayout';
+import canFocusInputOnScreenFocus from '../libs/canFocusInputOnScreenFocus';
const propTypes = {
/* Onyx Props */
@@ -54,7 +55,7 @@ class SetPasswordPage extends Component {
constructor(props) {
super(props);
- this.submitForm = this.submitForm.bind(this);
+ this.validateAndSubmitForm = this.validateAndSubmitForm.bind(this);
this.state = {
password: '',
@@ -65,7 +66,7 @@ class SetPasswordPage extends Component {
/**
* Validate the form and then submit it
*/
- submitForm() {
+ validateAndSubmitForm() {
if (!this.state.password.trim()) {
this.setState({
formError: 'Password cannot be blank',
@@ -85,47 +86,44 @@ class SetPasswordPage extends Component {
render() {
return (
- <>
-
-
-
-
-
-
-
- Enter a password
- this.setState({password: text})}
- onSubmitEditing={this.submitForm}
- />
-
-
- {this.state.formError && (
-
- {this.state.formError}
-
- )}
- {!_.isEmpty(this.props.account.error) && (
-
- {this.props.account.error}
-
- )}
-
-
-
- >
+
+
+
+ Enter a password:
+ this.setState({password: text})}
+ onSubmitEditing={this.validateAndSubmitForm}
+ autoCapitalize="none"
+ placeholderTextColor={themeColors.placeholderText}
+ autoFocus={canFocusInputOnScreenFocus()}
+ />
+
+
+
+
+
+ {this.state.formError && (
+
+ {this.state.formError}
+
+ )}
+
+ {!_.isEmpty(this.props.account.error) && (
+
+ {this.props.account.error}
+
+ )}
+
+
);
}
}