mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-08 04:00:51 +08:00
feat: support inline-captcha in login page (#3970)
This commit is contained in:
@@ -49,6 +49,9 @@ class SigninTable extends React.Component {
|
||||
|
||||
updateField(table, index, key, value) {
|
||||
table[index][key] = value;
|
||||
if (key === "name" && value === "Captcha") {
|
||||
table[index]["rule"] = "pop up";
|
||||
}
|
||||
this.updateTable(table);
|
||||
}
|
||||
|
||||
@@ -114,6 +117,7 @@ class SigninTable extends React.Component {
|
||||
{name: "Forgot password?", displayName: i18next.t("login:Forgot password?")},
|
||||
{name: "Login button", displayName: i18next.t("login:Signin button")},
|
||||
{name: "Signup link", displayName: i18next.t("general:Signup link")},
|
||||
{name: "Captcha", displayName: i18next.t("general:Captcha")},
|
||||
];
|
||||
|
||||
const getItemDisplayName = (text) => {
|
||||
@@ -249,6 +253,12 @@ class SigninTable extends React.Component {
|
||||
{id: "small", name: i18next.t("application:Small icon")},
|
||||
];
|
||||
}
|
||||
if (record.name === "Captcha") {
|
||||
options = [
|
||||
{id: "pop up", name: i18next.t("application:Pop up")},
|
||||
{id: "inline", name: i18next.t("application:Inline")},
|
||||
];
|
||||
}
|
||||
if (options.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user