Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2422 Fix on email invite link leading to blank screen #2437

Merged
merged 13 commits into from
Jun 21, 2017
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ class UpdatePasswordOverlay extends Component {
super();

this.state = {
password: ""
password: "",
showSpinner: true
};

this.handleFieldChange = this.handleFieldChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.handleCancel = this.handleCancel.bind(this);
}

componentWillReceiveProps() {
this.setState({ showSpinner: false });
}

handleFieldChange = (event, value, field) => {
this.setState({
[field]: value
Expand Down Expand Up @@ -93,20 +98,29 @@ class UpdatePasswordOverlay extends Component {
);
}

renderSpinnerOnLoad() {
return (
<div className="spinner-container">
<div className="spinner" />
</div>
);
}

render() {
const passwordClasses = classnames({
"form-group": true,
"has-error has-feedback": this.props.onError(this.props.messages.errors && this.props.messages.errors.password)
});
const { showSpinner } = this.state;

return (
<div>
<div>
{this.props.isOpen === true &&
<div>
<div className="modal-backdrop fade in" id={`modal-backdrop-${this.props.uniqueId}`} />
<div className="modal fade in" id={`modal-${this.props.uniqueId}`} style={{ display: "block" }}>
<div className="modal-dialog">

{showSpinner ? this.renderSpinnerOnLoad() :
<form className="modal-content" onSubmit={this.handleSubmit}>
<div className="modal-header">
<h4 className="modal-title">
Expand Down Expand Up @@ -153,6 +167,7 @@ class UpdatePasswordOverlay extends Component {
</div>

</form>
}
</div>
</div>
</div>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { i18next } from "/client/api";
import { composeWithTracker } from "/lib/api/compose";
import { MessagesContainer } from "../helpers";
import { Forgot } from "../../components";
import { LoginFormValidation } from "/lib/api";


class ForgotContainer extends Component {
static propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { Accounts } from "meteor/accounts-base";
import { composeWithTracker } from "/lib/api/compose";
import { UpdatePasswordOverlay } from "/client/modules/accounts/components";
import { MessagesContainer } from "/client/modules/accounts/containers/helpers";
import { TranslationProvider } from "/imports/plugins/core/ui/client/providers";
import { LoginFormValidation } from "/lib/api";

class UpdatePasswordOverlayContainer extends Component {
static propTypes = {
Expand Down Expand Up @@ -100,16 +102,18 @@ class UpdatePasswordOverlayContainer extends Component {

render() {
return (
<UpdatePasswordOverlay
uniqueId={this.props.uniqueId}
loginFormMessages={this.formMessages}
onError={this.hasError}
messages={this.state.formMessages}
onFormSubmit={this.handleFormSubmit}
onCancel={this.handleFormCancel}
isOpen={this.state.isOpen}
isDisabled={this.state.isDisabled}
/>
<TranslationProvider>
<UpdatePasswordOverlay
uniqueId={this.props.uniqueId}
loginFormMessages={this.formMessages}
onError={this.hasError}
messages={this.state.formMessages}
onFormSubmit={this.handleFormSubmit}
onCancel={this.handleFormCancel}
isOpen={this.state.isOpen}
isDisabled={this.state.isDisabled}
/>
</TranslationProvider>
);
}
}
Expand Down