fix error layouts
This commit is contained in:
parent
eb4b7c78a0
commit
ae40ef4460
2 changed files with 13 additions and 4 deletions
|
@ -373,15 +373,22 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let errorTextSection;
|
||||||
|
if (this.state.errorText) {
|
||||||
|
errorTextSection = (
|
||||||
|
<div className="mx_Login_error">
|
||||||
|
{ this.state.errorText }
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LoginPage>
|
<LoginPage>
|
||||||
<div className="mx_Login_box">
|
<div className="mx_Login_box">
|
||||||
<LoginHeader />
|
<LoginHeader />
|
||||||
<div>
|
<div>
|
||||||
{ header }
|
{ header }
|
||||||
<div className="mx_Login_error">
|
{ errorTextSection }
|
||||||
{ this.state.errorText }
|
|
||||||
</div>
|
|
||||||
{ this.componentForStep(this.state.currentFlow) }
|
{ this.componentForStep(this.state.currentFlow) }
|
||||||
{ serverConfig }
|
{ serverConfig }
|
||||||
<a className="mx_Login_create" onClick={this.props.onRegisterClick} href="#">
|
<a className="mx_Login_create" onClick={this.props.onRegisterClick} href="#">
|
||||||
|
|
|
@ -397,7 +397,9 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header = <h2>{ _t('Create an account') }</h2>;
|
header = <h2>{ _t('Create an account') }</h2>;
|
||||||
errorText = <div className="mx_Login_error">{ this.state.errorText }</div>;
|
if (this.state.errorText) {
|
||||||
|
errorText = <div className="mx_Login_error">{ this.state.errorText }</div>;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue