fix: logout url validation in frontend

pull/202/head
Specht, David 2022-03-18 18:10:25 +01:00
parent 148b5d90df
commit 5707fc4d39
2 changed files with 4 additions and 4 deletions

View File

@ -76,7 +76,7 @@ const EditRoomDialog: React.FC<Props> = ({ 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 ( return (
<div className="bbb-form-element"> <div className="bbb-form-element">
<label htmlFor={`bbb-${field}`}> <label htmlFor={`bbb-${field}`}>
@ -137,7 +137,7 @@ const EditRoomDialog: React.FC<Props> = ({ room, restriction, updateProperty, op
updateProperty('access', value); 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 && <div className="bbb-form-element bbb-form-shareWith"> {room.access === Access.InternalRestricted && <div className="bbb-form-element bbb-form-shareWith">
<ShareWith permission={Permission.User} room={room} shares={shares} setShares={setShares} /> <ShareWith permission={Permission.User} room={room} shares={shares} setShares={setShares} />

View File

@ -5,7 +5,7 @@ import {
} from 'react'; } from 'react';
export interface SubmitInputProps extends InputHTMLAttributes<HTMLInputElement> { export interface SubmitInputProps extends InputHTMLAttributes<HTMLInputElement> {
type?: 'text' | 'number'; type?: 'text' | 'number' | 'url';
initialValue?: string; initialValue?: string;
name: string; name: string;
onSubmitValue: (value: string) => void; onSubmitValue: (value: string) => void;