Add a warning about discarding unsaved changes
Also set the colspan of the label (on seperate row) to max.
Patch by: Sverre Rabbelier
--- a/app/soc/content/css/soc-090120.css Fri Jan 23 23:42:07 2009 +0000
+++ b/app/soc/content/css/soc-090120.css Sat Jan 24 00:07:34 2009 +0000
@@ -163,7 +163,7 @@
font-size: small;
}
-td.formfielderrorlabel, span.formfielderrorlabel {
+td.formfielderrorlabel, td.warning, span.formfielderrorlabel {
font-weight: bold;
color: #FF0000;
font-size: small;
--- a/app/soc/templates/soc/templatetags/_as_table_row.html Fri Jan 23 23:42:07 2009 +0000
+++ b/app/soc/templates/soc/templatetags/_as_table_row.html Sat Jan 24 00:07:34 2009 +0000
@@ -42,12 +42,17 @@
{% if select_url %}
<td><a href="{{ select_url }}">select</a></td>
- {% comment %} no else branch, as example_text will take care of the last <td></td> {% endcomment %}
+ {% else %}
+ <td></td>
{% endif %}
{% if example_text %}
<td class="formfieldexample">{{ example_text|safe }}</td>
- {% else %} {% if not select_url %}
- <td></td>
- {% endif %} {% endif %}
+ {% else %}
+ {% if select_url %}
+ <td class="warning">(discards unsaved changes)</td>
+ {% else %}
+ <td></td>
+ {% endif %}
+ {% endif %}
</tr>
--- a/app/soc/templates/soc/templatetags/_as_twoline_table_row.html Fri Jan 23 23:42:07 2009 +0000
+++ b/app/soc/templates/soc/templatetags/_as_twoline_table_row.html Sat Jan 24 00:07:34 2009 +0000
@@ -16,7 +16,7 @@
{% block label_row %}
<tr>
-<td class="{{ field_class_type }}">
+<td class="{{ field_class_type }}" colspan=4>
{{ label }}
</td>
</tr>