Skip to content

Commit

Permalink
BC-5119-Prevent create new neXboard (Front) (#3313)
Browse files Browse the repository at this point in the history
* Button Removed on topic edit .
  • Loading branch information
Michaellinaresxk authored Nov 20, 2023
1 parent bc0df6f commit eee257a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
15 changes: 3 additions & 12 deletions static/scripts/topicEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ class TopicBlockList extends React.Component {
* Render the list items.
*/
render() {
const neXboardEnabled = ($contentBlocksContainer.data('nexboardenabled') === true);
const h5pEditorEnabled = ($contentBlocksContainer.data('h5peditorenabled') === true);
return (
<div>
Expand Down Expand Up @@ -364,22 +363,14 @@ class TopicBlockList extends React.Component {
onClick={this.addBlock.bind(this, TopicGeoGebra)}>
{`+ ${$t('topic.topicEdit.button.geoGebraWorksheet')}`}
</button>
<button
<button
type="button"
className="btn btn-secondary"
data-testid="topic-addcontent-material-btn"
aria-label={$t('global.button.add')}
onClick={this.addBlock.bind(this, TopicResources)}>
{`+ ${$t('topic.topicEdit.button.material')}`}
</button>
{neXboardEnabled ? <button
type="button"
className="btn btn-secondary"
data-testid="topic-addcontent-nexboard-btn"
aria-label={$t('global.button.add')}
onClick={this.addBlock.bind(this, TopicNexboard)}>
{`+ ${$t('topic.topicEdit.button.neXboard')}`}
</button> : '' }
<button
type="button"
className="btn btn-secondary"
Expand All @@ -388,7 +379,7 @@ class TopicBlockList extends React.Component {
onClick={this.addBlock.bind(this, TopicEtherpad)}>
{`+ ${$t('topic.topicEdit.button.etherpad')}`}
</button>
<button
<button
type="button"
className="btn btn-secondary"
data-testid="topic-addcontent-task-btn"
Expand All @@ -403,7 +394,7 @@ class TopicBlockList extends React.Component {
aria-label={$t('global.button.add')}
onClick={this.addBlock.bind(this, TopicH5P)}>
{`+ ${$t('topic.topicEdit.button.h5p')}`}
</button> : ''
</button> : ''
}
</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions views/topic/edit-topic.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@

<div class="form-group">
<label>{{$t "topic._topic.label.content" }}</label>

<!-- React Magic -->
<div id="content-blocks" data-value="{{lesson.contents}}" data-parent-id="{{lesson._id}}" data-school-id="{{schoolId}}" data-parent-type="lessons" data-etherpadbaseurl="{{etherpadBaseUrl}}"
data-iscoursegroup="{{courseGroupId}}" data-nexboardenabled="{{#ifEnv "FEATURE_NEXBOARD_ENABLED" "true"}}true{{/ifEnv}}" data-h5peditorenabled="{{#ifConfig "FEATURE_H5P_EDITOR_ENABLED" true}}true{{/ifConfig}}"></div>
data-iscoursegroup="{{courseGroupId}}" data-h5peditorenabled="{{#ifConfig "FEATURE_H5P_EDITOR_ENABLED" true}}true{{/ifConfig}}"></div>
</div>
{{#ifneq 0 (arrayLength @root.lessonFilesStorageData.files)}}
<label>{{$t "topic._topic.label.embeddedFiles" }}</label>
Expand Down

0 comments on commit eee257a

Please sign in to comment.