diff --git a/cfp/forms.py b/cfp/forms.py index 603207c..befbf6b 100644 --- a/cfp/forms.py +++ b/cfp/forms.py @@ -80,10 +80,12 @@ class TalkForm(forms.ModelForm): del self.fields['category'] else: self.fields['category'].queryset = categories + if self.instance and self.instance.accepted is not True: + del self.fields['materials'] class Meta: model = Talk - fields = ('category', 'title', 'description', 'notes') + fields = ('category', 'title', 'description', 'notes', 'materials',) class TalkStaffForm(forms.ModelForm): @@ -93,7 +95,6 @@ class TalkStaffForm(forms.ModelForm): self.fields['category'].queryset = TalkCategory.objects.filter(site=conference.site) self.fields['track'].queryset = Track.objects.filter(site=conference.site) self.fields['room'].queryset = Room.objects.filter(site=conference.site) - self.fields['materials'].required = False if self.instance and self.instance.category and self.instance.category.duration: self.fields['duration'].help_text = _('Default duration: %(duration)d min') % {'duration': self.instance.duration} diff --git a/cfp/templates/cfp/proposal_talk_details.html b/cfp/templates/cfp/proposal_talk_details.html index 7a0fd6a..b564e19 100644 --- a/cfp/templates/cfp/proposal_talk_details.html +++ b/cfp/templates/cfp/proposal_talk_details.html @@ -82,6 +82,20 @@ {% endif %}
+{% if talk.materials or talk.video %} +diff --git a/cfp/templates/cfp/proposal_talk_form.html b/cfp/templates/cfp/proposal_talk_form.html index b7ba544..6f56fd9 100644 --- a/cfp/templates/cfp/proposal_talk_form.html +++ b/cfp/templates/cfp/proposal_talk_form.html @@ -21,7 +21,7 @@