mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
feat: enforce acceptance of terms and conditions for social logins (#3087)
* feat: Enforce acceptance of terms and conditions for social logins (#2975) * feat: add error message for agreement acceptance
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
import React from "react";
|
||||
import {Button, Form, Input, Radio, Result, Row} from "antd";
|
||||
import {Button, Form, Input, Radio, Result, Row, message} from "antd";
|
||||
import * as Setting from "../Setting";
|
||||
import * as AuthBackend from "./AuthBackend";
|
||||
import * as ProviderButton from "./ProviderButton";
|
||||
@ -653,8 +653,19 @@ class SignupPage extends React.Component {
|
||||
}
|
||||
return (
|
||||
|
||||
application.providers.filter(providerItem => this.isProviderVisible(providerItem)).map(providerItem => {
|
||||
return ProviderButton.renderProviderLogo(providerItem.provider, application, null, null, signupItem.rule, this.props.location);
|
||||
application.providers.filter(providerItem => this.isProviderVisible(providerItem)).map((providerItem, id) => {
|
||||
return (
|
||||
<span key={id} onClick={(e) => {
|
||||
if (!this.form.current.getFieldValue("agreement")) {
|
||||
e.preventDefault();
|
||||
message.error(i18next.t("signup:Please accept the agreement!"));
|
||||
}
|
||||
}}>
|
||||
{
|
||||
ProviderButton.renderProviderLogo(providerItem.provider, application, null, null, signupItem.rule, this.props.location)
|
||||
}
|
||||
</span>
|
||||
);
|
||||
})
|
||||
|
||||
);
|
||||
|
Reference in New Issue
Block a user