@@ -163,27 +163,27 @@ const CourseForm = (props) =>
163163 onChange : ( registrationMode ) => {
164164 switch ( registrationMode ) {
165165 case 'simple' :
166- props . update ( 'registration.autoRegistration' , false )
167- props . update ( 'registration.validation' , false )
166+ props . update ( props . name , 'registration.autoRegistration' , false )
167+ props . update ( props . name , 'registration.validation' , false )
168168 break
169169
170170 case 'auto' :
171- props . update ( 'registration.autoRegistration' , true )
171+ props . update ( props . name , 'registration.autoRegistration' , true )
172172
173173 // reset incompatible options
174- props . update ( 'restrictions._restrictUsers' , false )
175- props . update ( 'restrictions.users' , null )
176- props . update ( 'registration.mail' , false )
177- props . update ( 'registration.validation' , false )
178- props . update ( 'registration.userValidation' , false )
179- props . update ( 'registration.selfUnregistration' , false )
174+ props . update ( props . name , 'restrictions._restrictUsers' , false )
175+ props . update ( props . name , 'restrictions.users' , null )
176+ props . update ( props . name , 'registration.mail' , false )
177+ props . update ( props . name , 'registration.validation' , false )
178+ props . update ( props . name , 'registration.userValidation' , false )
179+ props . update ( props . name , 'registration.selfUnregistration' , false )
180180 break
181181
182182 case 'validation' :
183- props . update ( 'registration.validation' , true )
183+ props . update ( props . name , 'registration.validation' , true )
184184
185185 // reset incompatible options
186- props . update ( 'registration.autoRegistration' , false )
186+ props . update ( props . name , 'registration.autoRegistration' , false )
187187 break
188188 }
189189 }
0 commit comments