|
@@ -1,5 +1,6 @@
|
|
|
import React from 'react';
|
|
import React from 'react';
|
|
|
import PropTypes from 'prop-types';
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
+import ReactCardFlip from 'react-card-flip';
|
|
|
|
|
|
|
|
import { withTranslation } from 'react-i18next';
|
|
import { withTranslation } from 'react-i18next';
|
|
|
|
|
|
|
@@ -155,13 +156,13 @@ class LoginForm extends React.Component {
|
|
|
} = this.props;
|
|
} = this.props;
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <div className="back">
|
|
|
|
|
|
|
+ <React.Fragment>
|
|
|
{registrationMode === 'Restricted' && (
|
|
{registrationMode === 'Restricted' && (
|
|
|
- <p className="alert alert-warning">
|
|
|
|
|
- {t('page_register.notice.restricted')}
|
|
|
|
|
- <br />
|
|
|
|
|
- {t('page_register.notice.restricted_defail')}
|
|
|
|
|
- </p>
|
|
|
|
|
|
|
+ <p className="alert alert-warning">
|
|
|
|
|
+ {t('page_register.notice.restricted')}
|
|
|
|
|
+ <br />
|
|
|
|
|
+ {t('page_register.notice.restricted_defail')}
|
|
|
|
|
+ </p>
|
|
|
)}
|
|
)}
|
|
|
<form role="form" action="/register" method="post" id="register-form">
|
|
<form role="form" action="/register" method="post" id="register-form">
|
|
|
<div className="input-group" id="input-group-username">
|
|
<div className="input-group" id="input-group-username">
|
|
@@ -195,18 +196,18 @@ class LoginForm extends React.Component {
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
{registrationWhiteList.length > 0 && (
|
|
{registrationWhiteList.length > 0 && (
|
|
|
- <>
|
|
|
|
|
- <p className="form-text">{t('page_register.form_help.email')}</p>
|
|
|
|
|
- <ul>
|
|
|
|
|
- {registrationWhiteList.map((elem) => {
|
|
|
|
|
|
|
+ <>
|
|
|
|
|
+ <p className="form-text">{t('page_register.form_help.email')}</p>
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ {registrationWhiteList.map((elem) => {
|
|
|
return (
|
|
return (
|
|
|
<li key={elem}>
|
|
<li key={elem}>
|
|
|
<code>{elem}</code>
|
|
<code>{elem}</code>
|
|
|
</li>
|
|
</li>
|
|
|
);
|
|
);
|
|
|
})}
|
|
})}
|
|
|
- </ul>
|
|
|
|
|
- </>
|
|
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
<div className="input-group">
|
|
<div className="input-group">
|
|
@@ -240,7 +241,7 @@ class LoginForm extends React.Component {
|
|
|
</a>
|
|
</a>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </React.Fragment>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -254,27 +255,30 @@ class LoginForm extends React.Component {
|
|
|
} = this.props;
|
|
} = this.props;
|
|
|
|
|
|
|
|
const isLocalOrLdapStrategiesEnabled = isLocalStrategySetup || isLdapStrategySetup;
|
|
const isLocalOrLdapStrategiesEnabled = isLocalStrategySetup || isLdapStrategySetup;
|
|
|
- const registerFormClass = this.state.isRegistering ? 'to-flip' : '';
|
|
|
|
|
const isSomeExternalAuthEnabled = Object.values(objOfIsExternalAuthEnableds).some(elem => elem);
|
|
const isSomeExternalAuthEnabled = Object.values(objOfIsExternalAuthEnableds).some(elem => elem);
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <div className={`login-dialog mx-auto flipper ${registerFormClass}`} id="login-dialog">
|
|
|
|
|
|
|
+ <div className="login-dialog mx-auto" id="login-dialog">
|
|
|
<div className="row mx-0">
|
|
<div className="row mx-0">
|
|
|
<div className="col-12">
|
|
<div className="col-12">
|
|
|
- <div className="front">
|
|
|
|
|
- {isLocalOrLdapStrategiesEnabled && this.renderLocalOrLdapLoginForm()}
|
|
|
|
|
- {isSomeExternalAuthEnabled && this.renderExternalAuthLoginForm()}
|
|
|
|
|
- {isRegistrationEnabled && (
|
|
|
|
|
- <div className="row">
|
|
|
|
|
- <div className="col-12 text-right py-2">
|
|
|
|
|
- <a href="#register" id="register" className="link-switch" onClick={this.switchForm}>
|
|
|
|
|
- <i className="ti-check-box"></i> {t('Sign up is here')}
|
|
|
|
|
- </a>
|
|
|
|
|
|
|
+ <ReactCardFlip isFlipped={this.state.isRegistering} flipDirection="horizontal" cardZIndex="3">
|
|
|
|
|
+ <div className="front">
|
|
|
|
|
+ {isLocalOrLdapStrategiesEnabled && this.renderLocalOrLdapLoginForm()}
|
|
|
|
|
+ {isSomeExternalAuthEnabled && this.renderExternalAuthLoginForm()}
|
|
|
|
|
+ {isRegistrationEnabled && (
|
|
|
|
|
+ <div className="row">
|
|
|
|
|
+ <div className="col-12 text-right py-2">
|
|
|
|
|
+ <a href="#register" id="register" className="link-switch" onClick={this.switchForm}>
|
|
|
|
|
+ <i className="ti-check-box"></i> {t('Sign up is here')}
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
)}
|
|
)}
|
|
|
- </div>
|
|
|
|
|
- {isRegistrationEnabled && this.renderRegisterForm()}
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className="back">
|
|
|
|
|
+ {isRegistrationEnabled && this.renderRegisterForm()}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </ReactCardFlip>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<a href="https://growi.org" className="link-growi-org pl-3">
|
|
<a href="https://growi.org" className="link-growi-org pl-3">
|