File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
app/javascript/components/rooms/room/join Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ export default function JoinCard() {
7171 const queryParams = new URLSearchParams ( location . search ) ;
7272 const joinFormName = queryParams . get ( 'joinFormName' ) ;
7373 const viewerCode = queryParams . get ( 'viewerCode' ) ;
74+ const disableFormControls = queryParams . get ( 'disableFormControls' ) === 'true' ;
7475
7576 useEffect ( ( ) => { // set cookie to return to if needed
7677 const date = new Date ( ) ;
@@ -249,8 +250,20 @@ export default function JoinCard() {
249250 < Row >
250251 { ( roomStatusAPI . isSuccess && ! roomStatusAPI . data . status ) ? WaitingPage : (
251252 < Form methods = { methods } onSubmit = { handleJoin } >
252- < FormControl field = { fields . name } type = "text" disabled = { currentUser ?. signed_in } autoFocus = { ! currentUser ?. signed_in } />
253- { hasAccessCode && < FormControl field = { fields . accessCode } type = "text" autoFocus = { currentUser ?. signed_in } /> }
253+ < FormControl
254+ field = { fields . name }
255+ type = "text"
256+ disabled = { currentUser ?. signed_in || disableFormControls }
257+ autoFocus = { ! currentUser ?. signed_in }
258+ />
259+ { hasAccessCode && (
260+ < FormControl
261+ field = { fields . accessCode }
262+ type = "text"
263+ disabled = { disableFormControls }
264+ autoFocus = { currentUser ?. signed_in }
265+ />
266+ ) }
254267 { publicRoom ?. data ?. recording_consent === 'true' && (
255268 < FormControlGeneric
256269 id = { fields . recordingConsent . controlId }
You can’t perform that action at this time.
0 commit comments