diff --git a/src/components/views/dialogs/InteractiveAuthDialog.js b/src/components/views/dialogs/InteractiveAuthDialog.js index d1273849ae..5b0e34df2c 100644 --- a/src/components/views/dialogs/InteractiveAuthDialog.js +++ b/src/components/views/dialogs/InteractiveAuthDialog.js @@ -73,7 +73,7 @@ export default React.createClass({ if (this.state.authError) { content = (
-
{ this.state.authError.message || this.state.authError.toString() }
+
{ this.state.authError.message || this.state.authError.toString() }

); } + const shouldFocusContinueButton =!(bugreport==true); return ( -
-
diff --git a/src/components/views/login/InteractiveAuthEntryComponents.js b/src/components/views/login/InteractiveAuthEntryComponents.js index 81b84684fc..a0bb1065f2 100644 --- a/src/components/views/login/InteractiveAuthEntryComponents.js +++ b/src/components/views/login/InteractiveAuthEntryComponents.js @@ -127,6 +127,15 @@ export const PasswordAuthEntry = React.createClass({ ); } + let errorSection; + if (this.props.errorText) { + errorSection = ( +
+ { this.props.errorText } +
+ ); + } + return (

{ _t("To continue, please enter your password.") }

@@ -143,9 +152,7 @@ export const PasswordAuthEntry = React.createClass({ { submitButtonOrSpinner }
-
- { this.props.errorText } -
+ { errorSection }
); }, @@ -180,14 +187,22 @@ export const RecaptchaAuthEntry = React.createClass({ const CaptchaForm = sdk.getComponent("views.login.CaptchaForm"); const sitePublicKey = this.props.stageParams.public_key; + + let errorSection; + if (this.props.errorText) { + errorSection = ( +
+ { this.props.errorText } +
+ ); + } + return (
-
- { this.props.errorText } -
+ { errorSection }
); }, @@ -372,6 +387,14 @@ export const MsisdnAuthEntry = React.createClass({ mx_InteractiveAuthEntryComponents_msisdnSubmit: true, mx_UserSettings_button: true, // XXX button classes }); + let errorSection; + if (this.state.errorText) { + errorSection = ( +
+ { this.state.errorText } +
+ ); + } return (

{ _t("A text message has been sent to %(msisdn)s", @@ -393,9 +416,7 @@ export const MsisdnAuthEntry = React.createClass({ disabled={!enableSubmit} /> -

- { this.state.errorText } -
+ {errorSection}
); @@ -452,12 +473,18 @@ export const FallbackAuthEntry = React.createClass({ }, render: function() { + let errorSection; + if (this.props.errorText) { + errorSection = ( +
+ { this.props.errorText } +
+ ); + } return (
{ _t("Start authentication") } -
- { this.props.errorText } -
+ {errorSection}
); },