Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions materials/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ class AddSystemForm(forms.Form):
help_text="Enter n value for the dimensionality of this system if it applies",
)

class MultipleFileInput(forms.ClearableFileInput):
allow_multiple_selected = True

class AddPropertyForm(forms.Form):
name = forms.CharField(
Expand Down Expand Up @@ -688,8 +690,8 @@ class AddDataForm(forms.Form):
# Uploads
uploaded_files = forms.FileField(
required=False,
widget=forms.ClearableFileInput(attrs={"allow_multiple_selected": True}),
# widget=forms.ClearableFileInput(attrs={'allow_multiple_selected': True}),
widget=MultipleFileInput(),
#widget=forms.ClearableFileInput(attrs={'allow_multiple_selected': True}),
help_text=""
"Upload files containing anything that is relevant to the current "
"data (input files to a calculation, image of the sample, ...). "
Expand Down
Loading