From 11799b4c71330f8dd0636a386e7e6c2782e20f52 Mon Sep 17 00:00:00 2001 From: Luke Barnard <lukeb@openmarket.com> Date: Thu, 25 May 2017 15:27:54 +0100 Subject: [PATCH] Show "Password" instead of "New Password" when the existing password has been cached --- src/components/views/settings/ChangePassword.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/views/settings/ChangePassword.js b/src/components/views/settings/ChangePassword.js index bfc9ac264e..25af0e389f 100644 --- a/src/components/views/settings/ChangePassword.js +++ b/src/components/views/settings/ChangePassword.js @@ -193,12 +193,14 @@ module.exports = React.createClass({ switch (this.state.phase) { case this.Phases.Edit: + const passwordLabel = this.state.cachedPassword ? + 'Password' : 'New Password'; return ( <div className={this.props.className}> { currentPassword } <div className={rowClassName}> <div className={rowLabelClassName}> - <label htmlFor="password1">New password</label> + <label htmlFor="password1">{ passwordLabel }</label> </div> <div className={rowInputClassName}> <input id="password1" type="password" ref="new_input" autoFocus={this.props.autoFocusNewPasswordInput} />