Skip to content

Commit

Permalink
more generic template
Browse files Browse the repository at this point in the history
  • Loading branch information
ebertti committed Oct 4, 2013
1 parent 69c574d commit 64633c8
Showing 1 changed file with 13 additions and 27 deletions.
40 changes: 13 additions & 27 deletions cmsplugin_contact/templates/cmsplugin_contact/contact.html
Expand Up @@ -2,33 +2,19 @@

{% if form %}
<form action="." method="post">
<p{% if form.email.errors %} class="error"{% endif %}>
<label class="contact_field">{{ contact.email_label }}</label>
{{ form.email }}
{% if form.email.errors %}
{% for error in form.email.errors %}
<span class="error_msg">{{ error }}</span>
{% endfor %}
{% endif %}
</p>
<p{% if form.subject.errors %} class="error"{% endif %}>
<label class="contact_field">{{ contact.subject_label }}</label>
{{ form.subject }}
{% if form.subject.errors %}
{% for error in form.subject.errors %}
<span class="error_msg">{{ error }}</span>
{% endfor %}
{% endif %}
</p>
<p{% if form.content.errors %} class="error"{% endif %}>
<label class="contact_field">{{ contact.content_label }}</label>
{{ form.content }}
{% if form.content.errors %}
{% for error in form.content.errors %}
<span class="error_msg">{{ error }}</span>
{% endfor %}
{% endif %}
</p>
{% for field in form %}
{% if field.name != 'recaptcha_challenge_field' and field.name != 'recaptcha_theme' and field.name != 'recaptcha_response_field' and field.name != 'accept_terms' %}
<p{% if field.errors %} class="error"{% endif %}>
{{ field.label_tag }}
{{ field }}
{% if field.errors %}
{% for error in field.errors %}
<span class="error_msg">{{ error }}</span>
{% endfor %}
{% endif %}
</p>
{% endif %}
{% endfor %}
{% if form.recaptcha_challenge_field %}
<div{% if form.recaptcha_response_field.errors %} class="error"{% endif %}>
{{ form.recaptcha_challenge_field }}
Expand Down

0 comments on commit 64633c8

Please sign in to comment.