Commit c61a0112 authored by Matthieu Gautier's avatar Matthieu Gautier

Remove the motto.

Related to #41
parent 84cb5071
......@@ -37,7 +37,6 @@ class ContentForm(forms.ModelForm):
class MessageForm(forms.Form):
# Translators: Do not translate this, the translation is in Ideascube
author = forms.CharField(label=_("Name"), max_length=100)
motto = forms.CharField(label=_("Motto"))
# Translators: Do not translate this, the translation is in Ideascube
birth_year = forms.IntegerField(label=_("Birth year"), required=True,
min_value=current_year-150, max_value=current_year,
......
......@@ -18,7 +18,6 @@
{% block sidebar %}
<h3>{% trans 'About you' %}</h3>
{% form_field form.author %}
{% form_field form.motto %}
{% form_field form.birth_year %}
{% form_field form.address %}
{% form_field form.phone %}
......
......@@ -33,7 +33,7 @@ class MessageCreate(FormView):
template_name = 'irfi/message_form.html'
@staticmethod
def _generate_message_text(text, motto, document):
def _generate_message_text(text, document):
media_text = ''
if document:
media_text = (
......@@ -43,10 +43,9 @@ class MessageCreate(FormView):
type=document.kind, url=document.original.url,
id=document.id)
message = '<blockquote>{motto}</blockquote>\n{media}\n{text}'.format(
message = '{media}\n{text}'.format(
media=media_text,
text=text,
motto=motto)
text=text)
return message
......@@ -56,7 +55,6 @@ class MessageCreate(FormView):
def form_valid(self, form):
# Some variables
author = form.cleaned_data['author']
motto = form.cleaned_data['motto']
media = form.cleaned_data['media']
# FIXME: We can't make those translatable in the time we have;
......@@ -76,8 +74,7 @@ class MessageCreate(FormView):
full_name=author,
birth_year=form.cleaned_data['birth_year'],
phone=form.cleaned_data['phone'],
camp_address=form.cleaned_data['address'],
extra=motto)
camp_address=form.cleaned_data['address'])
break
except IntegrityError:
user_serial_id += 1
......@@ -109,7 +106,6 @@ class MessageCreate(FormView):
'media': document.id if document else None,
'text': self._generate_message_text(
text=form.cleaned_data['text'],
motto=motto,
document=document
)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment