wip: UI refactoring

* Display help messages for form fields

see #204
This commit is contained in:
Antoine Nguyen
2012-04-23 17:43:29 +02:00
parent a7ad90aee9
commit ddf3c2dad4
5 changed files with 6 additions and 4 deletions
+1 -2
View File
@@ -8,6 +8,5 @@ class LoginForm(forms.Form):
)
password = forms.CharField(
label=_("Password"),
widget=forms.PasswordInput(attrs={"class" : "span3"}),
help_text=_("Password used to authenticate")
widget=forms.PasswordInput(attrs={"class" : "span3"})
)
@@ -1,4 +1,4 @@
<pre id="rawheaders">
<pre id="rawheaders" class="well">
{% for k, v in headers %}{{ k }}: {{ v }}
{% endfor %}
</pre>
+1
View File
@@ -40,6 +40,7 @@ function modalbox(e, css, defhref, defcb, defclosecb) {
}
var $div = $('<div id="modalbox" class="modal" >' + data + '</div>')
.one('shown', function() {
$(".help").popover();
if (modalcb != undefined) {
if (typeof modalcb === "function") modalcb(); else eval(modalcb + '()');
}
+2
View File
@@ -1,5 +1,7 @@
{% load i18n %}
<div class="control-group {% if field.errors %}error{% endif %}"{% if hidden %}style="display: none"{% endif %}>
{% if field.label %}<label class="control-label" for="id_{{ field.html_name }}">{{ field.label }}</label>{% endif %}
{% if field.help_text %}<a href="#" class="help pull-left" data-original-title="{% trans 'Help:' %} {{ field.label }}" data-content="{{ field.help_text }}" rel="popover">?</a>{% endif %}
<div class="controls spaced">
{{ field }}{% if field.errors %}<p class="help-block">{% for error in field.errors %}{{ error|safe }}{% endfor %}</p>{% endif %}
</div>
+1 -1
View File
@@ -1,6 +1,6 @@
{% load i18n %}
{% block emailheaders %}
<div class="well">
<div id="emailheaders" class="well">
{% for hdr in headers %}<div class="row">
<div class="header">{{ hdr.name }}</div><div class="value">{{ hdr.value }}</div>
</div>{% endfor %}