From 5707fc4d39ec0ed15c72f30192b403cbc5cb20ec Mon Sep 17 00:00:00 2001 From: "Specht, David" Date: Fri, 18 Mar 2022 18:10:25 +0100 Subject: [PATCH] fix: logout url validation in frontend --- ts/Manager/EditRoomDialog.tsx | 6 +++--- ts/Manager/SubmitInput.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ts/Manager/EditRoomDialog.tsx b/ts/Manager/EditRoomDialog.tsx index 8631254..c94c1b7 100644 --- a/ts/Manager/EditRoomDialog.tsx +++ b/ts/Manager/EditRoomDialog.tsx @@ -76,14 +76,14 @@ const EditRoomDialog: React.FC = ({ room, restriction, updateProperty, op ); } - function inputElementRestricted(label: string, field: string, type: 'text' | 'number' = 'text', restricted: boolean) { + function inputElementRestricted(label: string, field: string, type: 'text' | 'number' | 'url' = 'text', restricted: boolean) { return (
- updateProperty(field, value)} disabled={restricted} /> + updateProperty(field, value)} disabled={restricted}/> {descriptions[field] && {descriptions[field]}}
); @@ -137,7 +137,7 @@ const EditRoomDialog: React.FC = ({ room, restriction, updateProperty, op updateProperty('access', value); })} - {inputElementRestricted(t('bbb', 'Custom redirect after meeting'), 'logoutURL', 'text', !restriction?.allowLogoutURL)} + {inputElementRestricted(t('bbb', 'Custom redirect after meeting'), 'logoutURL', 'url', !restriction?.allowLogoutURL)} {room.access === Access.InternalRestricted &&
diff --git a/ts/Manager/SubmitInput.tsx b/ts/Manager/SubmitInput.tsx index 2dc818c..587f5af 100644 --- a/ts/Manager/SubmitInput.tsx +++ b/ts/Manager/SubmitInput.tsx @@ -5,7 +5,7 @@ import { } from 'react'; export interface SubmitInputProps extends InputHTMLAttributes { - type?: 'text' | 'number'; + type?: 'text' | 'number' | 'url'; initialValue?: string; name: string; onSubmitValue: (value: string) => void;