mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 15:57:32 +00:00
Merge pull request #491 from zitadel/fix-findings
fix(ldap): translations
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { createNewSessionForLDAP } from "@/lib/server/idp";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
@@ -26,6 +27,8 @@ export function LDAPUsernamePasswordForm({ idpId, link }: Props) {
|
||||
mode: "onBlur",
|
||||
});
|
||||
|
||||
const t = useTranslations("ldap");
|
||||
|
||||
const [error, setError] = useState<string>("");
|
||||
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
@@ -66,7 +69,7 @@ export function LDAPUsernamePasswordForm({ idpId, link }: Props) {
|
||||
type="text"
|
||||
autoComplete="username"
|
||||
{...register("loginName", { required: "This field is required" })}
|
||||
label="Loginname"
|
||||
label={t("username")}
|
||||
data-testid="username-text-input"
|
||||
/>
|
||||
|
||||
@@ -75,7 +78,7 @@ export function LDAPUsernamePasswordForm({ idpId, link }: Props) {
|
||||
type="password"
|
||||
autoComplete="password"
|
||||
{...register("password", { required: "This field is required" })}
|
||||
label="Password"
|
||||
label={t("password")}
|
||||
data-testid="password-text-input"
|
||||
/>
|
||||
</div>
|
||||
@@ -98,7 +101,7 @@ export function LDAPUsernamePasswordForm({ idpId, link }: Props) {
|
||||
data-testid="submit-button"
|
||||
>
|
||||
{loading && <Spinner className="h-5 w-5 mr-2" />}
|
||||
<Translated i18nKey="verify.submit" namespace="ldap" />
|
||||
<Translated i18nKey="submit" namespace="ldap" />
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user