summaryrefslogtreecommitdiffstats
path: root/virtualenv/pffedportal
diff options
context:
space:
mode:
authorThomas NOEL <tnoel@entrouvert.com>2013-04-23 08:57:29 (GMT)
committerThomas NOEL <tnoel@entrouvert.com>2013-04-23 08:57:29 (GMT)
commit25c61b9bf9c461c5f66e1b1518ed7f951f70f8bc (patch)
treeba9c04bb954eff3efc07d1af6163a7721eba7fc5 /virtualenv/pffedportal
parent958cb58fda4b2a52f3b66deb21ff762df63cbc0a (diff)
downloadunivnautes-old-25c61b9bf9c461c5f66e1b1518ed7f951f70f8bc.zip
univnautes-old-25c61b9bf9c461c5f66e1b1518ed7f951f70f8bc.tar.gz
univnautes-old-25c61b9bf9c461c5f66e1b1518ed7f951f70f8bc.tar.bz2
bootstrapize mail form
Diffstat (limited to 'virtualenv/pffedportal')
-rw-r--r--virtualenv/pffedportal/base/forms.py5
-rw-r--r--virtualenv/pffedportal/templates/mail.html20
2 files changed, 16 insertions, 9 deletions
diff --git a/virtualenv/pffedportal/base/forms.py b/virtualenv/pffedportal/base/forms.py
index 7b8ebf8..8021a0b 100644
--- a/virtualenv/pffedportal/base/forms.py
+++ b/virtualenv/pffedportal/base/forms.py
@@ -26,3 +26,8 @@ class MailForm(forms.Form):
d'appareil que vous utilisez pour vous connecter, votre logiciel de
navigation sur le web, etc.""")
+ def __init__(self, *args, **kwargs):
+ super(MailForm, self).__init__(*args, **kwargs)
+ for f in self.fields:
+ self.fields[f].widget.attrs['class'] = 'span8'
+
diff --git a/virtualenv/pffedportal/templates/mail.html b/virtualenv/pffedportal/templates/mail.html
index 833b1ff..1f6f54c 100644
--- a/virtualenv/pffedportal/templates/mail.html
+++ b/virtualenv/pffedportal/templates/mail.html
@@ -19,21 +19,23 @@
</strong></p>
{% endif %}
- <form action="/mail" method="POST">
+ <form action="/mail" method="POST" class="form-horizontal">
{% csrf_token %}
{% for field in form %}
- <p>
- {{ field.label_tag }}<br />
- {% for error in field.errors %}<span class="error">{{error}}</span><br />{% endfor %}
- {{ field }}
- <br/>
- <span class="help">{{ field.help_text }}</span>
- </p>
+ <div class="control-group">
+ <label class="control-label">{{ field.label }}
+ {% for error in field.errors %}<br /><font color="red"><i class="icon-warning-sign"></i> {{error}}</font>{% endfor %}
+ </label>
+ <div class="controls">{{ field }}
+ <span class="help-block">{{ field.help_text }}</span>
+ </div>
+ </div>
{% endfor %}
<br />
+ <div class="control-group"><div class="controls">
<input id="submit" type="submit" value="Envoyer ce message" />
+ </div></div>
</form>
-
</div><!--/span-->
</div><!--/row-->
{% endblock %}