From 14e4b089fa2e9cba30d0db2301c45a5e7d39b0aa Mon Sep 17 00:00:00 2001
From: Sander Roosendaal Dear {{ username }},
+ {{ registeredname }} has opted out from Social Media posts regarding the
+ virtual challenge {{ racename }}
+
+ If you are making any posts to Social Media about the event, you have to
+ do this without mentioning their name.
+
+ As the organizer of the virtual challenge it is your responsibility to
+ respect this. Rowsandall.com is not responsible for any damage caused.
+
+ Best Regards, the Rowsandall Team
+
+ The challenge organizer may want to publish about the challenge on social media and + use your name in the results. If you do not want your name to appear on social media, + you can let this know by unchecking the check box in the form. +
{% if race.coursestandards %}This race uses standard times and limits the race groups to those where standard times exist. The "Group" form choice will overrule other selections you @@ -52,7 +57,7 @@ {% csrf_token %} - + diff --git a/rowers/views/racesviews.py b/rowers/views/racesviews.py index e2b06a4d..09a3cb0e 100644 --- a/rowers/views/racesviews.py +++ b/rowers/views/racesviews.py @@ -1518,6 +1518,7 @@ def virtualevent_addboat_view(request,id=0): adaptiveclass = cd['adaptiveclass'] age = cd['age'] mix = cd['mix'] + acceptsocialmedia = cd['acceptsocialmedia'] sex = r.sex if mix: @@ -1612,12 +1613,22 @@ def virtualevent_addboat_view(request,id=0): entrycategory=coursestandard, sex=sex, age=age, + acceptsocialmedia=acceptsocialmedia, ) record.save() add_rower_race(r,race) + # send email about opt out + if not acceptsocialmedia: + job = myqueue( + queue, + handle_sendemail_optout, + race.manager.email,race.manager.first_name, + r.user.first_name+' '+r.user.last_name, + race.name,race.id, + ) messages.info( @@ -1767,6 +1778,7 @@ def virtualevent_register_view(request,id=0): adaptiveclass = cd['adaptiveclass'] age = cd['age'] mix = cd['mix'] + acceptsocialmedia = cd['acceptsocialmedia'] sex = r.sex if mix: @@ -1829,13 +1841,23 @@ def virtualevent_register_view(request,id=0): coursecompleted=False, sex=sex, age=age, - entrycategory=coursestandard, - referencespeed=referencespeed, + entrycategory=coursestandard, + referencespeed=referencespeed, + acceptsocialmedia = acceptsocialmedia, ) record.save() add_rower_race(r,race) + # send email about opt out + if not acceptsocialmedia: + job = myqueue( + queue, + handle_sendemail_optout, + race.manager.email,race.manager.first_name, + r.user.first_name+' '+r.user.last_name, + race.name,race.id, + ) # remove followers myfollows = VirtualRaceFollower.objects.filter(user=r.user,race=race) @@ -2028,6 +2050,7 @@ def indoorvirtualevent_register_view(request,id=0): adaptiveclass = cd['adaptiveclass'] age = cd['age'] boatclass = cd['boatclass'] + acceptsocialmedia = cd['acceptsocialmedia'] sex = r.sex @@ -2086,13 +2109,24 @@ def indoorvirtualevent_register_view(request,id=0): sex=sex, age=age, entrycategory=coursestandard, - referencespeed=referencespeed + referencespeed=referencespeed, + acceptsocialmedia=acceptsocialmedia, ) record.save() add_rower_race(r,race) + # send email about opt out + if not acceptsocialmedia: + job = myqueue( + queue, + handle_sendemail_optout, + race.manager.email,race.manager.first_name, + r.user.first_name+' '+r.user.last_name, + race.name,race.id, + ) + # remove followers myfollows = VirtualRaceFollower.objects.filter(user=r.user,race=race) for f in myfollows: diff --git a/rowers/views/statements.py b/rowers/views/statements.py index 2bd13221..24c3290d 100644 --- a/rowers/views/statements.py +++ b/rowers/views/statements.py @@ -211,6 +211,7 @@ from rowers.tasks import ( handle_sendemail_userdeleted, handle_sendemail_raceregistration, handle_sendemail_racesubmission, + handle_sendemail_optout, handle_sendemail_ical, )