hide verify password when password is not set

pull/733/head
Audric Ackermann 6 years ago
parent 932ae77675
commit aeaa3b9e5d
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -437,8 +437,9 @@ export class RegistrationTabs extends React.Component<{}, State> {
} }
private renderNamePasswordAndVerifyPasswordFields() { private renderNamePasswordAndVerifyPasswordFields() {
const {password, passwordFieldsMatch} = this.state;
const passwordsDoNotMatch = const passwordsDoNotMatch =
!this.state.passwordFieldsMatch && this.state.password !passwordFieldsMatch && this.state.password
? window.i18n('passwordsDoNotMatch') ? window.i18n('passwordsDoNotMatch')
: undefined; : undefined;
@ -470,18 +471,18 @@ export class RegistrationTabs extends React.Component<{}, State> {
}} }}
/> />
<SessionInput {!!password && <SessionInput
label={window.i18n('verifyPassword')} label={window.i18n('verifyPassword')}
error={passwordsDoNotMatch} error={passwordsDoNotMatch}
type="password" type="password"
placeholder={window.i18n('optionalPassword')} placeholder={window.i18n('verifyPassword')}
onValueChanged={(val: string) => { onValueChanged={(val: string) => {
this.onPasswordVerifyChanged(val); this.onPasswordVerifyChanged(val);
}} }}
onEnterPressed={() => { onEnterPressed={() => {
this.handlePressEnter(); this.handlePressEnter();
}} }}
/> />}
</div> </div>
); );
} }

Loading…
Cancel
Save