Skip to content

Commit

Permalink
Add margin class for login provider forms
Browse files Browse the repository at this point in the history
  • Loading branch information
impactmass committed Sep 19, 2018
1 parent c9a07d2 commit 48db7cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions imports/plugins/core/accounts/client/components/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ class Login extends Component {
}

render() {
const currentRoute = Router.current().route;
const isOauthFlow = currentRoute.options && currentRoute.options.meta && currentRoute.options.meta.oauthLoginFlow;
const idpFormClass = isOauthFlow ? "idp-form" : "";
if (this.state.currentView === "loginFormSignInView" || this.state.currentView === "loginFormSignUpView") {
const currentRoute = Router.current().route;
const isOauthFlow = currentRoute.options && currentRoute.options.meta && currentRoute.options.meta.oauthLoginFlow;
if (isOauthFlow) {
return (
<Components.OAuthFormContainer
Expand All @@ -81,12 +82,14 @@ class Login extends Component {
);
} else if (this.state.currentView === "loginFormResetPasswordView") {
return (
<Components.ForgotPassword
credentials={this.props.credentials}
uniqueId={this.props.uniqueId}
currentView={this.state.currentView}
onSignInClick={this.showSignInView}
/>
<div className={idpFormClass}>
<Components.ForgotPassword
credentials={this.props.credentials}
uniqueId={this.props.uniqueId}
currentView={this.state.currentView}
onSignInClick={this.showSignInView}
/>
</div>
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion imports/plugins/core/hydra-oauth/client/containers/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class OAuthFormContainer extends Component {

render() {
return (
<div>
<div className="idp-form">
{this.renderAuthView()}
</div>
);
Expand Down

0 comments on commit 48db7cb

Please sign in to comment.