Login: Ldap: fix display wrong placeholder on disabled LDAP settings
This commit is contained in:
parent
7f2b4c9686
commit
b614938b2b
@ -70,7 +70,7 @@ async function Page() {
|
||||
reCaptchaPublicKey={settings?.recaptchaPublicKey}
|
||||
reCaptchaType={settings?.recaptchaType}
|
||||
ldapDomain={capabilities?.ldapDomain}
|
||||
ldapEnabled={capabilities?.ldapEnabled}
|
||||
ldapEnabled={capabilities?.ldapEnabled || false}
|
||||
/>
|
||||
<ThirdParty
|
||||
thirdParty={thirdParty}
|
||||
|
@ -112,7 +112,9 @@ const LoginForm = ({
|
||||
const [password, setPassword] = useState("");
|
||||
|
||||
const [isChecked, setIsChecked] = useState(false);
|
||||
const [isLdapLoginChecked, setIsLdapLoginChecked] = useState(!!ldapDomain);
|
||||
const [isLdapLoginChecked, setIsLdapLoginChecked] = useState(
|
||||
ldapEnabled || false,
|
||||
);
|
||||
const [isCaptcha, setIsCaptcha] = useState(false);
|
||||
const [isCaptchaSuccessful, setIsCaptchaSuccess] = useState(false);
|
||||
const [isCaptchaError, setIsCaptchaError] = useState(false);
|
||||
@ -171,10 +173,6 @@ const LoginForm = ({
|
||||
[t, referenceUrl, currentCulture],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
setIsLdapLoginChecked(!!ldapDomain);
|
||||
}, [ldapDomain]);
|
||||
|
||||
useEffect(() => {
|
||||
const profile = localStorage.getItem("profile");
|
||||
if (!profile) return;
|
||||
|
Loading…
Reference in New Issue
Block a user