mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
feat: skip agreement check when the terms are not visible (#3088)
This commit is contained in:
@ -749,7 +749,9 @@ class LoginPage extends React.Component {
|
|||||||
application.providers.filter(providerItem => this.isProviderVisible(providerItem)).map((providerItem, id) => {
|
application.providers.filter(providerItem => this.isProviderVisible(providerItem)).map((providerItem, id) => {
|
||||||
return (
|
return (
|
||||||
<span key ={id} onClick={(e) => {
|
<span key ={id} onClick={(e) => {
|
||||||
if (!this.form.current.getFieldValue("agreement")) {
|
const agreementChecked = this.form.current.getFieldValue("agreement");
|
||||||
|
|
||||||
|
if (agreementChecked !== undefined && typeof agreementChecked === "boolean" && !agreementChecked) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
message.error(i18next.t("signup:Please accept the agreement!"));
|
message.error(i18next.t("signup:Please accept the agreement!"));
|
||||||
}
|
}
|
||||||
|
@ -656,7 +656,9 @@ class SignupPage extends React.Component {
|
|||||||
application.providers.filter(providerItem => this.isProviderVisible(providerItem)).map((providerItem, id) => {
|
application.providers.filter(providerItem => this.isProviderVisible(providerItem)).map((providerItem, id) => {
|
||||||
return (
|
return (
|
||||||
<span key={id} onClick={(e) => {
|
<span key={id} onClick={(e) => {
|
||||||
if (!this.form.current.getFieldValue("agreement")) {
|
const agreementChecked = this.form.current.getFieldValue("agreement");
|
||||||
|
|
||||||
|
if (agreementChecked !== undefined && typeof agreementChecked === "boolean" && !agreementChecked) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
message.error(i18next.t("signup:Please accept the agreement!"));
|
message.error(i18next.t("signup:Please accept the agreement!"));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user