# HG changeset patch # User Lennard de Rijk # Date 1233531410 0 # Node ID c0294f3c28db127a4cf20b58e0209163d7e7de42 # Parent cb282e6baa1c9785a130b5f026042ba643dca24b 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 diff -r cb282e6baa1c -r c0294f3c28db app/soc/templates/soc/user/edit_profile.html --- 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 %} -
{{ tos_contents|safe|linebreaks }} -
{% field_as_table_row form.agreed_to_tos %} diff -r cb282e6baa1c -r c0294f3c28db app/soc/views/models/user_self.py --- 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):