diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-06-13 15:01:55 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-06-13 15:01:55 +0200 |
| commit | b4550095d45d58b5bfc5ba2a454529287f396415 (patch) | |
| tree | d86b4ee3f87443c14e269964a16d7a29269a5ba5 /ishtar/templates | |
| parent | 48b80343051bae90b13b20922311b7d331103425 (diff) | |
| download | Ishtar-b4550095d45d58b5bfc5ba2a454529287f396415.tar.bz2 Ishtar-b4550095d45d58b5bfc5ba2a454529287f396415.zip | |
Provide help for form fields (closes #481)
Diffstat (limited to 'ishtar/templates')
| -rw-r--r-- | ishtar/templates/default_wizard.html | 20 | ||||
| -rw-r--r-- | ishtar/templates/grid_form.html | 10 |
2 files changed, 24 insertions, 6 deletions
diff --git a/ishtar/templates/default_wizard.html b/ishtar/templates/default_wizard.html index 33eac942c..752728ab3 100644 --- a/ishtar/templates/default_wizard.html +++ b/ishtar/templates/default_wizard.html @@ -21,9 +21,13 @@ {% for formsetform in form.forms %} {% for field in formsetform %} <tr{% if field.field.required %} class='required'{% endif %}> - <th><label for="{{ field.label }}">{{ field.label_tag }}</th> - <td> {{ field.errors }}{{field|safe}}</td> - </tr>{% endfor %} + <th>{{ field.label_tag }}</th> + <td> {{ field.errors }}{{field|safe}}</td>{% if field.help_text %} + <td><a href="#{{field.name}}" class="help_display" title="{% trans "Help"%}">?</a></td> + </tr> + <tr class="help_text" id="{{field.name}}_help"> + <td colspan="3"><div>{{field.help_text}}</div></td> + {%endif%}</tr>{% endfor %} {% endfor %} <tr class='modify'><td colspan="2"><button name="formset_modify" value="{{form_step}}">{% trans "Add/Modify" %}</button></td></tr></li> </table> @@ -31,9 +35,13 @@ <table> {% for field in form %} <tr{% if field.field.required %} class='required'{% endif %}> - <th><label for="{{ field.label }}">{{ field.label_tag }}</th> - <td> {{ field.errors }}{{field|safe}}</td> - </tr>{% endfor %} + <th>{{ field.label_tag }}</th> + <td> {{ field.errors }}{{field|safe}}</td>{% if field.help_text %} + <td><a href="#{{field.name}}" class="help_display" title="{% trans "Help"%}">?</a></td> + </tr> + <tr class="help_text" id="{{field.name}}_help"> + <td colspan="3"><div>{{field.help_text}}</div></td> + {%endif%}</tr>{% endfor %} </table> {% endif %} <input type="hidden" name="{{ step_field }}" value="{{ step0 }}" /> diff --git a/ishtar/templates/grid_form.html b/ishtar/templates/grid_form.html new file mode 100644 index 000000000..8c02197b4 --- /dev/null +++ b/ishtar/templates/grid_form.html @@ -0,0 +1,10 @@ +{% load i18n %} + {% for field in form %} + <tr{% if field.field.required %} class='required'{% endif %}> + <th>{{ field.label_tag }}</th> + <td> {{ field.errors }}{{field|safe}}</td>{% if field.help_text %} + <td><a href="#{{field.name}}" class="help_display" title="{% trans "Help"%}">?</a></td> + </tr> + <tr class="help_text" id="{{field.name}}_help"> + <td colspan="3"><div>{{field.help_text}}</div></td> + {%endif%}</tr>{% endfor %} |
