diff --git a/frontend/components/learning_circle_form/FinalizeSection.jsx b/frontend/components/learning_circle_form/FinalizeSection.jsx index 84f08cf6..8cbe9038 100644 --- a/frontend/components/learning_circle_form/FinalizeSection.jsx +++ b/frontend/components/learning_circle_form/FinalizeSection.jsx @@ -2,10 +2,11 @@ import React, { useState } from 'react' import { TextareaWithLabel, SelectWithLabel, InputWithLabel, SwitchWithLabels } from 'p2pu-components' const SignupLimit = (props) => { - - let maxSignups = null; - let defaultLimit = 20; - if (window.maxSignups){ + // maxSignups indicates if there is a hard limit set, iow + // you can toggle unlimited signups if it isn't null + let maxSignups = null + let defaultLimit = 20 + if (window.maxSignups !== undefined){ maxSignups = window.maxSignups defaultLimit = maxSignups } @@ -20,7 +21,7 @@ const SignupLimit = (props) => { return ( <> - { !maxSignups && + { (maxSignups === null) && { value={props.learningCircle.signup_limit !== undefined} /> } - { (props.learningCircle.signup_limit !== undefined || maxSignups) && + { (props.learningCircle.signup_limit !== undefined || maxSignups !== null) && {% if object.pk %}