Skip to content

Commit

Permalink
Add mailto to contact type email in events
Browse files Browse the repository at this point in the history
Fix #255.
  • Loading branch information
HacKanCuBa committed Apr 8, 2018
1 parent d478791 commit 1446fb7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion eventol/manager/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,15 @@ def clean(self):

return cleaned_data

def save(self, commit=True):
instance = super().save(commit=False)
# Add mailto, issue 255
if self.cleaned_data['type'] == 2:
instance.url = 'mailto:' + self.cleaned_data['url']
if commit:
instance.save()
return instance


class ContactMessageForm(ModelForm):
class Meta(object):
Expand Down Expand Up @@ -411,7 +420,7 @@ class EventForm(ModelForm):
class Meta(object):
model = Event
fields = ('name', 'slug', 'limit_proposal_date', 'email',
'place', 'external_url', 'event_information')
'place', 'external_url', 'abstract', 'event_information')
widgets = {'place': forms.HiddenInput(),
'limit_proposal_date': forms.HiddenInput()}

Expand Down

0 comments on commit 1446fb7

Please sign in to comment.