diff options
Diffstat (limited to 'pyblackbird_cc/resources/forms.py')
-rw-r--r-- | pyblackbird_cc/resources/forms.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pyblackbird_cc/resources/forms.py b/pyblackbird_cc/resources/forms.py index 41ad3c8..1a5b51a 100644 --- a/pyblackbird_cc/resources/forms.py +++ b/pyblackbird_cc/resources/forms.py @@ -179,3 +179,29 @@ class ResourceUpdateMetadataForm(forms.ModelForm): "subcategories", "feature_slot", ] + + +class ResourceUpdateThumbnailsForm(forms.Form): + def __init__(self, *args, **kwargs): + self.resource = kwargs.pop("resource") + super().__init__(*args, **kwargs) + self.helper = FormHelper(self) + self.helper.add_input(Submit("submit", "Submit")) + + thumbnail_files = forms.FileField( + widget=forms.TextInput( + attrs={ + "multiple": True, + "type": "File", + "required": True, + }, + ), + required=False, + label="Cover images", + help_text="Your cover image will be displayed in the search results and as " + "the first image on your resource page in the preview function. " + "It is important to add an eye catching cover image that gives " + "other teachers an idea about what your resource contains. " + "You can multi-select up to 5 .png or .jpg files here.", + ) + |