diff options
author | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2011-11-25 16:59:58 -0300 |
---|---|---|
committer | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2011-11-25 16:59:58 -0300 |
commit | aca74afa5f0e425b4cf050482eb1beca7c181c98 (patch) | |
tree | 0675df142c678a967789b4edbd2ad7b53100d06b | |
parent | 68fbb9b62ca50809d28ab187360c57ee4a46abed (diff) | |
download | askbot-aca74afa5f0e425b4cf050482eb1beca7c181c98.tar.gz askbot-aca74afa5f0e425b4cf050482eb1beca7c181c98.tar.bz2 askbot-aca74afa5f0e425b4cf050482eb1beca7c181c98.zip |
fixed error messages display in feedback form
-rw-r--r-- | askbot/forms.py | 5 | ||||
-rw-r--r-- | askbot/skins/default/templates/feedback.html | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/askbot/forms.py b/askbot/forms.py index 0479ad49..eb0269b1 100644 --- a/askbot/forms.py +++ b/askbot/forms.py @@ -539,8 +539,9 @@ class NotARobotForm(forms.Form): ) class FeedbackForm(forms.Form): - name = forms.CharField(label=_('Your name:'), required=False) - email = forms.EmailField(label=_('Email (not shared with anyone):'), required=False) + name = forms.CharField(label=_('Your name (optional):'), required=False) + email = forms.EmailField(label=_('Email (not shared with anyone):'), required=False, + help_text=_("if you don't want to give your email, check the box below, please note that we won't be able to contact you later.")) message = forms.CharField(label=_('Your message:'), max_length=800,widget=forms.Textarea(attrs={'cols':60})) no_email = forms.BooleanField(label=_("I don't want to give my email"), required=False) next = NextUrlField() diff --git a/askbot/skins/default/templates/feedback.html b/askbot/skins/default/templates/feedback.html index ab9f2298..9070d1c4 100644 --- a/askbot/skins/default/templates/feedback.html +++ b/askbot/skins/default/templates/feedback.html @@ -3,6 +3,11 @@ {% block title %}{% spaceless %}{% trans %}Feedback{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} <h1 class="section-title">{% trans %}Give us your feedback!{% endtrans %}</h1> +{% if form.errors %} +<span class="error"> + {{form.errors.__all__}} +</span> +{%endif%} <form method="post" action="{% url feedback %}" accept-charset="utf-8">{% csrf_token %} {% if user.is_authenticated() %} <p class="message"> @@ -25,6 +30,7 @@ <span class='error'>{% trans %}(please enter a valid email){% endtrans %}</span> {% endif %} </label><br/>{{form.email}} + <p>{{form.email.help_text}}</p> </div> <div class="form-row"> <label>{{form.no_email.label}} @@ -46,6 +52,10 @@ </div> {% if form.recaptcha %} <div class="form-row"> + {% if form.errors.recaptcha%} + <span class="error">{% trans %}(Please solve the captcha){% endtrans %}</span> + </label> + {% endif %} {{form.recaptcha}} </div> {% endif %} |