diff --git a/cms/templates/widgets/tabs/metadata-edit-tab.html b/cms/templates/widgets/tabs/metadata-edit-tab.html index 96a28dad0a..1d99f44120 100644 --- a/cms/templates/widgets/tabs/metadata-edit-tab.html +++ b/cms/templates/widgets/tabs/metadata-edit-tab.html @@ -1,6 +1,7 @@ <%namespace name='static' file='../../static_content.html'/> <% import json + import copy %> ## js templates @@ -13,5 +14,10 @@ <%static:include path="js/${template_name}.underscore" /> % endfor - -
+<% metadata_field_copy = copy.copy(editable_metadata_fields) %> +## Delete 'thumbnail' field (if it exists) so metadata editor view does not attempt to render it. +% if 'thumbnail' in editable_metadata_fields: + ## the new video editor needs access to the 'thumbnail' value, so delete from a copy. + <% del metadata_field_copy['thumbnail'] %> +% endif + diff --git a/xmodule/video_module/video_xfields.py b/xmodule/video_module/video_xfields.py index 06eb200062..a03f81c71d 100644 --- a/xmodule/video_module/video_xfields.py +++ b/xmodule/video_module/video_xfields.py @@ -212,3 +212,11 @@ class VideoFields: scope=Scope.settings, default=False ) + # thumbnail is need as a field for the new video editor. The field is hidden in + # the legacy modal. + thumbnail = String( + help=_("Add a specific thumbnail for learners to see before playing the video."), + display_name=_("Thumbnail"), + scope=Scope.settings, + default="", + )