From 7a5c731b25fc75d5bdc0e6bbd9abc279beeec18e Mon Sep 17 00:00:00 2001 From: Seth Call Date: Wed, 17 Mar 2021 20:51:32 -0500 Subject: [PATCH] Fix bug with affiliate links and also move paypal.me text --- web/app/controllers/api_controller.rb | 2 +- .../clients/_account_affiliate_partner.html.slim | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/web/app/controllers/api_controller.rb b/web/app/controllers/api_controller.rb index 6ec166f45..234388c11 100644 --- a/web/app/controllers/api_controller.rb +++ b/web/app/controllers/api_controller.rb @@ -117,7 +117,7 @@ class ApiController < ApplicationController raise JamPermissionError, ValidationMessages::PERMISSION_VALIDATION_ERROR elsif @partner.partner_user.nil? raise JamPermissionError, ValidationMessages::PERMISSION_VALIDATION_ERROR - elsif !current_user.admin || @partner.partner_user != current_user + elsif !current_user.admin && @partner.partner_user != current_user raise JamPermissionError, ValidationMessages::PERMISSION_VALIDATION_ERROR end elsif current_user diff --git a/web/app/views/clients/_account_affiliate_partner.html.slim b/web/app/views/clients/_account_affiliate_partner.html.slim index 059b7f14c..e613cb47c 100644 --- a/web/app/views/clients/_account_affiliate_partner.html.slim +++ b/web/app/views/clients/_account_affiliate_partner.html.slim @@ -42,7 +42,11 @@ script type="text/template" id="template-affiliate-partner-account" | We must have a complete mailing address and a valid tax ID in order to process and mail payments due to all affiliates.  Per the terms of the affiliate agreement, if this information is not available within 90 days of the end of a calendar quarter, then any payment obligation due to the affiliate for such calendar quarter shall be considered fully and permanently discharged, and no further payment for such calendar quarter shall be due or payable to affiliate. br br - | For fastest receipt of payment, please specify a PayPal.Me account. + span + | For fastest receipt of payment, please specify a PayPal.Me account (ex: + b + |   paypal.me/YourName + |   ) br br | So please provide this data, and be sure to keep it current! @@ -79,13 +83,6 @@ script type="text/template" id="template-affiliate-partner-account" .affiliate-label PayPal.Me: = text_field_tag('affiliate_partner_paypal_id', "{{ data.paypal_id }}", { class: 'w60' }) br - span style="padding-left:138px" - | A PayPal.Me link looks like  - b paypal.me/YourName - |  Please read more info  - a href="https://www.paypal.com/us/smarthelp/article/What-is-PayPalMe-FAQ3025" - | about PayPal.Me - br br .spacer .input-buttons