If a site-wide ToS exist, display the User profile "Agrees to ToS" checkbox.
authorTodd Larsen <tlarsen@google.com>
Tue, 20 Jan 2009 23:13:03 +0000
changeset 857 9767c1afe494
parent 856 3d14b31e72e4
child 858 e79e7a22326f
If a site-wide ToS exist, display the User profile "Agrees to ToS" checkbox. Patch by: Todd Larsen Review by: to-be-reviewed
app/soc/templates/soc/user/edit_self.html
app/soc/views/models/user_self.py
--- a/app/soc/templates/soc/user/edit_self.html	Tue Jan 20 23:01:24 2009 +0000
+++ b/app/soc/templates/soc/user/edit_self.html	Tue Jan 20 23:13:03 2009 +0000
@@ -56,6 +56,20 @@
   </tr>
   <tr><td colspan="4">&nbsp;</td></tr>
 
+{% if tos_link %}
+  {% field_as_table_row form.agrees_to_tos %}
+  <tr>
+   <td class="fieldhelptext" colspan="4">
+In order to participate on this site, you must agree to the
+<a href="{{tos_link}}">site-wide Terms of Service</a>.<br><br>
+(There may also be additional Terms of Service specific to participation
+in certain Programs or Groups.  Those are agreed to elsewhere on the site,
+when signing up for the specific participation Roles.)
+   </td>
+  </tr>
+  <tr><td colspan="4">&nbsp;</td></tr>
+{% endif %}
+
  </table>
  <table>
   <tr>
--- a/app/soc/views/models/user_self.py	Tue Jan 20 23:01:24 2009 +0000
+++ b/app/soc/views/models/user_self.py	Tue Jan 20 23:13:03 2009 +0000
@@ -176,8 +176,9 @@
         new_link_id = form.cleaned_data.get('link_id')
         properties = {
           'link_id': new_link_id,
-          'name': form.cleaned_data.get("name"),
+          'name': form.cleaned_data.get('name'),
           'account': account,
+          'agrees_to_tos': form.cleaned_data.get('agrees_to_tos'),
         }
 
         # check if user account is not in former_accounts