diff --git a/src/components/login/Registration.js b/src/components/login/Registration.js
index f7a9be36..8fda406d 100644
--- a/src/components/login/Registration.js
+++ b/src/components/login/Registration.js
@@ -94,6 +94,10 @@ module.exports = React.createClass({
onFormSubmit: function(formVals) {
var self = this;
+ this.setState({
+ errorText: "",
+ busy: true
+ });
this.onProcessingRegistration(this.registerLogic.register(formVals));
},
@@ -122,12 +126,18 @@ module.exports = React.createClass({
identityServerUrl: self.registerLogic.getIdentityServerUrl(),
accessToken: response.access_token
});
+ self.setState({
+ busy: false
+ });
}, function(err) {
if (err.message) {
self.setState({
errorText: err.message
});
}
+ self.setState({
+ busy: false
+ });
console.log(err);
});
},
@@ -158,6 +168,9 @@ module.exports = React.createClass({
this.registerLogic.tellStage("m.login.recaptcha", {
divId: divIdName
});
+ this.setState({
+ busy: false // requires user input
+ });
},
// TODO:
@@ -211,11 +224,19 @@ module.exports = React.createClass({
console.error("Unknown register state: %s", currStep);
break;
}
+ var busySpinner;
+ if (this.state.busy) {
+ var Spinner = sdk.getComponent("atoms.Spinner");
+ busySpinner = (
+