From 359dd9816e9488a84186cdca8ac5d5a90818f899 Mon Sep 17 00:00:00 2001 From: Michael Hall Date: Wed, 9 May 2018 22:28:08 -0400 Subject: [PATCH] Add member contact form for team admins. --- events/forms.py | 4 + get_together/templates/get_together/base.html | 8 +- .../get_together/emails/member_contact.html | 13 +++ .../get_together/emails/member_contact.txt | 10 +++ .../get_together/events/show_event.html | 22 ++--- .../get_together/teams/manage_members.html | 82 +++++++++++++++++ .../get_together/teams/show_team.html | 16 ++-- get_together/urls.py | 1 + get_together/views/events.py | 8 ++ get_together/views/speakers.py | 2 +- get_together/views/teams.py | 90 ++++++++++++++++++- get_together/views/utils.py | 22 ++--- 12 files changed, 238 insertions(+), 40 deletions(-) create mode 100644 get_together/templates/get_together/emails/member_contact.html create mode 100644 get_together/templates/get_together/emails/member_contact.txt create mode 100644 get_together/templates/get_together/teams/manage_members.html diff --git a/events/forms.py b/events/forms.py index 078a49a..01a4b73 100644 --- a/events/forms.py +++ b/events/forms.py @@ -183,6 +183,10 @@ class TeamDefinitionForm(forms.ModelForm): class DeleteTeamForm(forms.Form): confirm = forms.BooleanField(label="Yes, delete team", required=True) +class TeamContactForm(forms.Form): + to = forms.ChoiceField(label=_("")) + body = forms.CharField(label=_(""), widget=forms.widgets.Textarea) + class TeamEventForm(forms.ModelForm): recurrences = recurrence.forms.RecurrenceField(label="Repeat", required=False) class Meta: diff --git a/get_together/templates/get_together/base.html b/get_together/templates/get_together/base.html index 1f52352..37776fd 100644 --- a/get_together/templates/get_together/base.html +++ b/get_together/templates/get_together/base.html @@ -48,10 +48,10 @@