From 4ca76675b299cba00c9f414cb3e6adf237d3d6f8 Mon Sep 17 00:00:00 2001 From: Mikkel Jakobsen Date: Fri, 13 Oct 2023 09:48:55 +0200 Subject: [PATCH] Make the cancel button go to the logout path That should force the user to be logged out and redirect the user to the frontpage --- src/apps/create-patron-user-info/CreatePatron.dev.tsx | 4 ++++ src/apps/create-patron-user-info/UserInfo.tsx | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/apps/create-patron-user-info/CreatePatron.dev.tsx b/src/apps/create-patron-user-info/CreatePatron.dev.tsx index 8d8cf39b65..ec2c39ed4b 100644 --- a/src/apps/create-patron-user-info/CreatePatron.dev.tsx +++ b/src/apps/create-patron-user-info/CreatePatron.dev.tsx @@ -27,6 +27,10 @@ export default { defaultValue: "https://login.bib.dk/userinfo", control: { type: "text" } }, + logOutUrl: { + defaultValue: "/Logout", + control: { type: "text" } + }, textNotificationsEnabledConfig: { defaultValue: "1", control: { type: "text" } diff --git a/src/apps/create-patron-user-info/UserInfo.tsx b/src/apps/create-patron-user-info/UserInfo.tsx index bdf3b8c152..48c122db9b 100644 --- a/src/apps/create-patron-user-info/UserInfo.tsx +++ b/src/apps/create-patron-user-info/UserInfo.tsx @@ -17,6 +17,7 @@ export interface UserInfoProps { const UserInfo: FC = ({ cpr }) => { const t = useText(); + const { logoutUrl } = useUrls(); const config = useConfig(); const formRef = useRef(null); const { redirectOnUserCreatedUrl } = useUrls(); @@ -104,8 +105,9 @@ const UserInfo: FC = ({ cpr }) => {