mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-07 02:20:28 +08:00
feat: can set default value for "Auto sign in" in application edit page (#3987)
This commit is contained in:
@@ -898,7 +898,7 @@ class LoginPage extends React.Component {
|
||||
initialValues={{
|
||||
organization: application.organization,
|
||||
application: application.name,
|
||||
autoSignin: true,
|
||||
autoSignin: !application?.signinItems.map(signinItem => signinItem.name === "Forgot password?" && signinItem.rule === "Auto sign in - False")?.includes(true),
|
||||
username: Conf.ShowGithubCorner ? "admin" : "",
|
||||
password: Conf.ShowGithubCorner ? "123" : "",
|
||||
}}
|
||||
|
@@ -118,6 +118,7 @@ class SigninTable extends React.Component {
|
||||
{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")},
|
||||
{name: "Auto sign in", displayName: i18next.t("login:Auto sign in")},
|
||||
];
|
||||
|
||||
const getItemDisplayName = (text) => {
|
||||
@@ -259,6 +260,13 @@ class SigninTable extends React.Component {
|
||||
{id: "inline", name: i18next.t("application:Inline")},
|
||||
];
|
||||
}
|
||||
if (record.name === "Forgot password?") {
|
||||
options = [
|
||||
{id: "None", name: `${i18next.t("login:Auto sign in")} - ${i18next.t("general:True")}`},
|
||||
{id: "Auto sign in - False", name: `${i18next.t("login:Auto sign in")} - ${i18next.t("general:False")}`},
|
||||
];
|
||||
}
|
||||
|
||||
if (options.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user