Set the right field type in user_self to overcome confusion.
Also reverted a template change.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- a/app/soc/templates/soc/user/edit_profile.html Sun Feb 01 23:27:28 2009 +0000
+++ b/app/soc/templates/soc/user/edit_profile.html Sun Feb 01 23:36:50 2009 +0000
@@ -60,9 +60,7 @@
{% if not user.agreed_to_tos %}
<tr>
<td>
- <div id="ToS" style="overflow:auto" height="200px" width="400px">
{{ tos_contents|safe|linebreaks }}
- </div>
</td>
</tr>
{% field_as_table_row form.agreed_to_tos %}
--- a/app/soc/views/models/user_self.py Sun Feb 01 23:27:28 2009 +0000
+++ b/app/soc/views/models/user_self.py Sun Feb 01 23:36:50 2009 +0000
@@ -172,7 +172,7 @@
form.fields['agreed_to_tos_on'].initial = entity.agreed_to_tos_on
# replace the 'agreed_to_tos' field with a hidden field so
# that the form checks still pass
- form.fields['agreed_to_tos'] = forms.fields.CharField(widget=forms.HiddenInput,
+ form.fields['agreed_to_tos'] = forms.fields.BooleanField(widget=forms.HiddenInput,
initial=entity.agreed_to_tos, required=True)
def editPost(self, request, entity, context, params=None):