feat: add thumbnail field to video xblock fields
This commit is contained in:
@@ -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" />
|
||||
</script>
|
||||
% endfor
|
||||
|
||||
<div class="wrapper-comp-settings metadata_edit" id="settings-tab" data-metadata='${json.dumps(editable_metadata_fields) | h}'></div>
|
||||
<% 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
|
||||
<div class="wrapper-comp-settings metadata_edit" id="settings-tab" data-metadata='${json.dumps(metadata_field_copy) | h}'></div>
|
||||
|
||||
@@ -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="",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user