diff --git a/rowers/braintreestuff.py b/rowers/braintreestuff.py index c7238887..184cc58e 100644 --- a/rowers/braintreestuff.py +++ b/rowers/braintreestuff.py @@ -241,7 +241,6 @@ def create_subscription(rower,data): "payment_method_nonce": nonce_from_the_client }) - if result.is_success: payment_method_token = result.payment_method.token else: @@ -252,6 +251,7 @@ def create_subscription(rower,data): "plan_id": plan.external_id }) + if result.is_success: rower.paidplan = plan rower.planexpires = result.subscription.billing_period_end_date diff --git a/rowers/teams.py b/rowers/teams.py index 95073998..7be8d03a 100644 --- a/rowers/teams.py +++ b/rowers/teams.py @@ -597,7 +597,7 @@ def process_request_code(manager,code): if rekwest.team.manager != manager: return (0,'You are not the manager of this team') - result = add_member(t.id,r) + result,comment = add_member(t.id,r) if not result: return (result,"The member couldn't be added") @@ -622,7 +622,7 @@ def process_invite_code(user,code): return (0,'The invitation has expired') t = invitation.team - result = add_member(t.id,r) + result, comment = add_member(t.id,r) if not result: return (result,"The member couldn't be added") diff --git a/rowers/templates/coachregisteremail.html b/rowers/templates/coachregisteremail.html new file mode 100644 index 00000000..f2f5b7df --- /dev/null +++ b/rowers/templates/coachregisteremail.html @@ -0,0 +1,42 @@ +{% extends "emailbase.html" %} + +{% block body %} +

Dear {{ first_name }},

+ +

+ Thank you for registering on rowsandall.com. + You can now login using the credentials you provided. + The first thing you should do is go to the + Settings page + and make yourself familiar with the various options + available to personalize your experience on the website. + To get there, use the link in the email or click the user icon + in the upper right corner of the opening page. +

+ +

+ As a new member on the free coach plan, you can start with your first training + group and invite athletes to join it. + For more information about training groups and managing athletes, please read + our explanation at + https://analytics.rowsandall.com/2019/02/24/managing-a-rowing-training-group-coaching-and-remote-coaching-on-rowsandall-com/. +

+ +

+ As long as you are on the free coach plan, you can only managing athletes who are + on one of the paid plans. To remove this limitation, upgrade to one of the paid + coaching plans: + https://rowsandall.com/rowers/paidplans +

+ +

+ Oh, one more thing. The site is + developing fast. Bear with us. Don't hesitate to + contact me at info@rowsandall.com if anything is broken + or doesn't seem to work as advertised. +

+ +

+ Best Regards, the Rowsandall Team +

+{% endblock %} diff --git a/rowers/templates/paidplans.html b/rowers/templates/paidplans.html index c66f0dff..4038f032 100644 --- a/rowers/templates/paidplans.html +++ b/rowers/templates/paidplans.html @@ -250,6 +250,16 @@ {% endif %} + {% elif rower and rower.rowerplan == 'freecoach' %} + + + {% elif rower and rower.rowerplan == 'pro' %}   diff --git a/rowers/templates/registeremail.html b/rowers/templates/registeremail.html index 20c81907..267358b3 100644 --- a/rowers/templates/registeremail.html +++ b/rowers/templates/registeremail.html @@ -10,8 +10,8 @@ Settings page and make yourself familiar with the various options available to personalize your experience on the website. - To get there, use the link in the email or click the button - with your first name on it in the upper right corner of the opening page. + To get there, use the link in the email or click the user icon + in the upper right corner of the opening page.

diff --git a/rowers/views/paymentviews.py b/rowers/views/paymentviews.py index 87c58028..34a1f133 100644 --- a/rowers/views/paymentviews.py +++ b/rowers/views/paymentviews.py @@ -614,7 +614,7 @@ def freecoach_register_view(request): d = {'first_name':theuser.first_name} send_template_email(from_address,[fullemail], - subject,'registeremail.html',d) + subject,'coachregisteremail.html',d) subject2 = "New Free Coach"