diff --git a/castellum/studies/forms.py b/castellum/studies/forms.py index 74b8028a8c4a3bfa2052a345dbd7d6944f75a6eb..9970d818e4537bd862e448bbbfe8126cbfdbfd56 100644 --- a/castellum/studies/forms.py +++ b/castellum/studies/forms.py @@ -116,6 +116,13 @@ class StudyFilterForm(forms.Form): start = forms.DateTimeField() end = forms.DateTimeField() + def clean(self): + cleaned_data = super().clean() + if self.data.get('type') == 'onetime_invitation': + cleaned_data['is_onetime_invitation'] = True + print(cleaned_data) + return cleaned_data + class SessionForm(forms.ModelForm): class Meta: diff --git a/castellum/studies/templates/studies/study_list.html b/castellum/studies/templates/studies/study_list.html index bed11a9550fc9b5c1d064655c7b93be6dff93f7c..6643777b1c6e1ab01b2adb7d3b17e4e13f28b7e7 100644 --- a/castellum/studies/templates/studies/study_list.html +++ b/castellum/studies/templates/studies/study_list.html @@ -6,61 +6,84 @@ {% block container_class %}container-lg{% endblock %} {% block content %} -