mirror of https://github.com/vector-im/riot-web
Show "Password" instead of "New Password" when the existing password has been cached
parent
0707b7440a
commit
11799b4c71
|
@ -193,12 +193,14 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
switch (this.state.phase) {
|
switch (this.state.phase) {
|
||||||
case this.Phases.Edit:
|
case this.Phases.Edit:
|
||||||
|
const passwordLabel = this.state.cachedPassword ?
|
||||||
|
'Password' : 'New Password';
|
||||||
return (
|
return (
|
||||||
<div className={this.props.className}>
|
<div className={this.props.className}>
|
||||||
{ currentPassword }
|
{ currentPassword }
|
||||||
<div className={rowClassName}>
|
<div className={rowClassName}>
|
||||||
<div className={rowLabelClassName}>
|
<div className={rowLabelClassName}>
|
||||||
<label htmlFor="password1">New password</label>
|
<label htmlFor="password1">{ passwordLabel }</label>
|
||||||
</div>
|
</div>
|
||||||
<div className={rowInputClassName}>
|
<div className={rowInputClassName}>
|
||||||
<input id="password1" type="password" ref="new_input" autoFocus={this.props.autoFocusNewPasswordInput} />
|
<input id="password1" type="password" ref="new_input" autoFocus={this.props.autoFocusNewPasswordInput} />
|
||||||
|
|
Loading…
Reference in New Issue