Skip to content

Commit

Permalink
fix: move watchers field above
Browse files Browse the repository at this point in the history
  • Loading branch information
AfaqShuaib09 committed Jul 25, 2023
1 parent dc8f334 commit 9214b7a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 47 deletions.
48 changes: 24 additions & 24 deletions src/components/EditCoursePage/EditCourseForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,30 @@ export class BaseEditCourseForm extends React.Component {
disabled={disabled || !administrator}
optional
/>
{administrator && (
<Field
name="watchers_list"
component={ReduxFormCreatableSelect}
label={(
<FieldLabel
id="watchers.label"
text="Watchers"
helpText={(
<p>
A list of email addresses that will receive
notifications when the course run of the course is published or reviewed.
</p>
)}
optional
/>
)}
isMulti
disabled={!(courseInfo?.data?.course_run_statuses?.includes(REVIEW_BY_INTERNAL) && administrator)}
optional
isCreatable
createOptionValidator={emailValidate}
/>
)}
<div>
<FieldLabel helpText={productSourceHelp} id="productSource" text="Product Source" className="mb-2" />
<div className="mb-3">{parsedProductSource}</div>
Expand Down Expand Up @@ -1093,30 +1117,6 @@ export class BaseEditCourseForm extends React.Component {
disabled={disabled}
optional
/>
{administrator && (
<Field
name="watchers_list"
component={ReduxFormCreatableSelect}
label={(
<FieldLabel
id="watchers.label"
text="Watchers"
helpText={(
<p>
A list of email addresses that will receive
notifications when the course run of the course is published or reviewed.
</p>
)}
optional
/>
)}
isMulti
disabled={!(courseInfo?.data?.course_run_statuses?.includes(REVIEW_BY_INTERNAL) && administrator)}
optional
isCreatable
createOptionValidator={emailValidate}
/>
)}

{administrator && (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5683,6 +5683,29 @@ exports[`BaseEditCourseForm renders html correctly with administrator being true
pattern="^[a-z0-9_]+(?:-[a-z0-9_]+)*$"
type="text"
/>
<Field
component={[Function]}
createOptionValidator={[Function]}
disabled={true}
isCreatable={true}
isMulti={true}
label={
<FieldLabel
className=""
extraText=""
helpText={
<p>
A list of email addresses that will receive notifications when the course run of the course is published or reviewed.
</p>
}
id="watchers.label"
optional={true}
text="Watchers"
/>
}
name="watchers_list"
optional={true}
/>
<div>
<FieldLabel
className="mb-2"
Expand Down Expand Up @@ -6718,29 +6741,6 @@ exports[`BaseEditCourseForm renders html correctly with administrator being true
requiredHeight={110}
requiredWidth={110}
/>
<Field
component={[Function]}
createOptionValidator={[Function]}
disabled={true}
isCreatable={true}
isMulti={true}
label={
<FieldLabel
className=""
extraText=""
helpText={
<p>
A list of email addresses that will receive notifications when the course run of the course is published or reviewed.
</p>
}
id="watchers.label"
optional={true}
text="Watchers"
/>
}
name="watchers_list"
optional={true}
/>
<FieldLabel
className="mb-2"
extraText=""
Expand Down

0 comments on commit 9214b7a

Please sign in to comment.