diff --git a/.env b/.env index bc90a8652..5216b43b6 100644 --- a/.env +++ b/.env @@ -24,3 +24,4 @@ SUPPORT_EMAIL='' SUPPORT_URL='' USER_INFO_COOKIE_NAME='' ENABLE_PROGRESS_GRAPH_SETTINGS=false +ENABLE_TEAM_TYPE_SETTING=false diff --git a/.env.development b/.env.development index d4f64ff0a..93cc6f42d 100644 --- a/.env.development +++ b/.env.development @@ -26,3 +26,4 @@ SUPPORT_EMAIL='support@example.com' SUPPORT_URL='https://support.edx.org' USER_INFO_COOKIE_NAME='edx-user-info' ENABLE_PROGRESS_GRAPH_SETTINGS=false +ENABLE_TEAM_TYPE_SETTING=false diff --git a/.env.test b/.env.test index 08fe63780..b81b58ced 100644 --- a/.env.test +++ b/.env.test @@ -25,3 +25,4 @@ SUPPORT_EMAIL='support@example.com' SUPPORT_URL='https://support.edx.org' USER_INFO_COOKIE_NAME='edx-user-info' ENABLE_PROGRESS_GRAPH_SETTINGS=false +ENABLE_TEAM_TYPE_SETTING=false diff --git a/src/index.jsx b/src/index.jsx index a57532bb8..643689a6f 100755 --- a/src/index.jsx +++ b/src/index.jsx @@ -49,6 +49,7 @@ initialize({ LEARNING_BASE_URL: process.env.LEARNING_BASE_URL, CALCULATOR_HELP_URL: process.env.CALCULATOR_HELP_URL || null, ENABLE_PROGRESS_GRAPH_SETTINGS: process.env.ENABLE_PROGRESS_GRAPH_SETTINGS || 'false', + ENABLE_TEAM_TYPE_SETTING: process.env.ENABLE_TEAM_TYPE_SETTING === 'true', }, 'CourseAuthoringConfig'); }, }, diff --git a/src/pages-and-resources/teams/GroupEditor.jsx b/src/pages-and-resources/teams/GroupEditor.jsx index c281776eb..1a9c464a5 100644 --- a/src/pages-and-resources/teams/GroupEditor.jsx +++ b/src/pages-and-resources/teams/GroupEditor.jsx @@ -2,6 +2,7 @@ import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; import { Button, Form, TransitionReplace } from '@edx/paragon'; import PropTypes from 'prop-types'; import React, { useState } from 'react'; +import { getConfig } from '@edx/frontend-platform'; import { GroupTypes, TeamSizes } from '../../data/constants'; import CollapsableEditor from '../../generic/CollapsableEditor'; @@ -31,6 +32,7 @@ function GroupEditor({ const [isOpen, setOpen] = useState(group.id === null); const initiateDeletion = () => setDeleting(true); const cancelDeletion = () => setDeleting(false); + const showTeamTypeSetting = getConfig().ENABLE_TEAM_TYPE_SETTING; const handleToggle = (open) => setOpen(Boolean(errors.name || errors.maxTeamSize || errors.description) || open); @@ -95,6 +97,7 @@ function GroupEditor({ style={{ minHeight: '2.5rem' }} className={formGroupClasses} /> + {showTeamTypeSetting && ( {intl.formatMessage(messages.groupFormTypeLabel)} @@ -119,6 +122,7 @@ function GroupEditor({ ))} + )}