mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
feat: terms of use auto selected (#1485)
This commit is contained in:
@ -530,7 +530,15 @@ export function isAgreementRequired(application) {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function renderAgreement(required, onClick, noStyle, layout) {
|
||||
export function isDefaultTrue(application) {
|
||||
const agreementItem = application.signupItems.find(item => item.name === "Agreement");
|
||||
if (isAgreementRequired(application) && agreementItem.rule === "Signin (Default True)") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function renderAgreement(required, onClick, noStyle, layout, initialValue) {
|
||||
return (
|
||||
<Form.Item
|
||||
name="agreement"
|
||||
@ -544,6 +552,7 @@ export function renderAgreement(required, onClick, noStyle, layout) {
|
||||
]}
|
||||
{...layout}
|
||||
noStyle={noStyle}
|
||||
initialValue={initialValue}
|
||||
>
|
||||
<Checkbox style={{float: "left"}}>
|
||||
{i18next.t("signup:Accept")}
|
||||
|
Reference in New Issue
Block a user