Add revert button to client credentials form
Some checks failed
Weblate Sync / Trigger Weblate to pull the latest changes (push) Has been cancelled

Signed-off-by: Tero Saarni <tero.saarni@est.tech>
This commit is contained in:
Tero Saarni 2026-01-28 18:51:45 +02:00 committed by Marek Posolda
parent cb4c533464
commit 47b91b995d
2 changed files with 4 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View file

@ -60,6 +60,7 @@ export const Credentials = ({ client, save, refresh }: CredentialsProps) => {
control,
formState: { isDirty },
handleSubmit,
reset,
} = useFormContext<FormFields>();
const clientAuthenticatorType = useWatch({
@ -222,6 +223,9 @@ export const Credentials = ({ client, save, refresh }: CredentialsProps) => {
<Button variant="primary" type="submit" isDisabled={!isDirty}>
{t("save")}
</Button>
<Button variant="link" onClick={() => reset()}>
{t("revert")}
</Button>
</ActionGroup>
</CardBody>
</Card>