Swap field value and "required" columns to make more columns for field errors.
authorTodd Larsen <tlarsen@google.com>
Thu, 18 Sep 2008 17:32:28 +0000
changeset 162 8ee23f825ba8
parent 161 f4af04306890
child 163 1f67538ff619
Swap field value and "required" columns to make more columns for field errors.
app/soc/templates/soc/templatetags/_field_as_table_row.html
--- a/app/soc/templates/soc/templatetags/_field_as_table_row.html	Thu Sep 18 17:31:01 2008 +0000
+++ b/app/soc/templates/soc/templatetags/_field_as_table_row.html	Thu Sep 18 17:32:28 2008 +0000
@@ -14,23 +14,26 @@
 {% if field.errors %}
 <tr>
  <td>&nbsp;</td>
- <td>&nbsp;</td>
- <td colspan="2" class="formfielderror">
+ <td colspan="3" class="formfielderror">
   {{ field.errors|join:"<br />" }}
  </td>
 </tr>
 {% endif %}
 <tr>
+{% if field.errors %}
+ <td class="formfielderrorlabel">
+{% else %} 
  <td class="formfieldlabel">
+{% endif %}
   <label for="{{ field.auto_id }}">{{ field.label }}
   </label> 
  </td>
+ <td>
+  {{ field }}
+ </td>
  <td class="formfieldrequired">
    {% if field.field.required %}(required){% endif %}
  </td>
- <td>
-  {{ field }}
- </td>
  <td class="formfieldhelptext">
   {{ field.help_text }}
  </td>