Skip to content

Commit

Permalink
Remove commented code, add FxA Subscriptions URL to settings/env vari…
Browse files Browse the repository at this point in the history
…ables with prod fallback
  • Loading branch information
maxxcrawford committed Jun 11, 2021
1 parent 3286710 commit 300fd7e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 19 deletions.
1 change: 1 addition & 0 deletions .env-dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ON_HEROKU=False
FXA_OAUTH_ENDPOINT=https://oauth.stage.mozaws.net/v1
FXA_PROFILE_ENDPOINT=https://profile.stage.mozaws.net/v1
FXA_SETTINGS_URL=https://accounts.stage.mozaws.net/settings
FXA_SUBSCRIPTIONS_URL=https://accounts.stage.mozaws.net/subscriptions
GOOGLE_ANALYTICS_ID="UA-77033033-33"
SECRET_KEY=unsafe-secret-key-for-dev-envs
ADMIN_ENABLED=
Expand Down
1 change: 1 addition & 0 deletions privaterelay/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ def _get_initial_middleware():
SOCIALACCOUNT_EMAIL_VERIFICATION = 'none'

FXA_SETTINGS_URL = config('FXA_SETTINGS_URL', 'https://accounts.firefox.com/settings')
FXA_SUBSCRIPTIONS_URL = config('FXA_SUBSCRIPTIONS_URL', 'https://accounts.firefox.com/subscriptions')

LOGGING = {
'version': 1,
Expand Down
17 changes: 1 addition & 16 deletions privaterelay/templates/includes/banners.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<div class="banner-copy flx flx-col">
<p class="banner-hl ff-Met">{% ftlmsg 'banner-upgrade-headline' %}</p>
<p class="banner-sub">{% ftlmsg 'banner-upgrade-copy' %}</p>
<a class="banner-link ff-Met" href="https://accounts.stage.mozaws.net/subscriptions/products/{{ settings.PREMIUM_PROD_ID }}?plan={{ settings.PREMIUM_PRICE_ID }}" target="_blank" rel="noopener noreferrer">{% ftlmsg 'banner-upgrade-cta' %}</a>
<a class="banner-link ff-Met" href="{{ settings.FXA_SUBSCRIPTIONS_URL }}/products/{{ settings.PREMIUM_PROD_ID }}?plan={{ settings.PREMIUM_PRICE_ID }}" target="_blank" rel="noopener noreferrer">{% ftlmsg 'banner-upgrade-cta' %}</a>
</div>
</div>
</div>
Expand All @@ -67,20 +67,6 @@ <h2>{% ftlmsg 'banner-choose-subdomain-headline-aliases' %}</h2>
<p class="warning">{% ftlmsg 'banner-choose-subdomain-warning' %}</p>
</div>
</div>
<!-- <div class="banner-gradient-bg">
<div class="choose-subdomain-banner banner-content flx flx-row">
<div class="banner-relay-logo banner-logo"></div>
<div class="banner-copy flx flx-col">
<p class="banner-hl ff-Met">{% ftlmsg 'banner-choose-subdomain-headline' %}</p>
<p class="banner-sub">{% ftlmsg 'banner-choose-subdomain-copy' %}</p>
<form method="post" action="{% url 'profile_subdomain' %}">
{% csrf_token %}
<input type="text" name="subdomain">
<input type="submit">
</form>
</div>
</div>
</div> -->
{% else %}
<div class="banner-gradient-bg">
<div class="show-subdomain-banner banner-content flx flx-row">
Expand All @@ -89,7 +75,6 @@ <h2>{% ftlmsg 'banner-choose-subdomain-headline-aliases' %}</h2>
<p class="banner-hl ff-Met">{% ftlmsg 'banner-choose-subdomain-label' %}</p>
<p class="banner-sub">{{ user_profile.subdomain }}</p>
{% user_email_domain user_profile %}
<!-- {% user_email_domain user_profile as user_subdomain %} -->
<p>{% ftlmsg 'banner-choose-subdomain-label' subdomain=user_subdomain %}</p>
</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions privaterelay/templates/includes/domain-alias-dashboard.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{% load relay_tags %}
{% load ftl %}
{% ftlconf bundle='privaterelay.ftl_bundles.main' %}
Expand All @@ -12,7 +11,7 @@ <h3>
{% ftlmsg 'banner-pack-upgrade-copy' %}
</p>
<a class="btn btn--blue" target="_blank" rel="noopener noreferrer"
href="https://accounts.stage.mozaws.net/subscriptions/products/{{ settings.PREMIUM_PROD_ID }}?plan={{ settings.PREMIUM_PRICE_ID }}">
href="{{ settings.FXA_SUBSCRIPTIONS_URL }}/products/{{ settings.PREMIUM_PROD_ID }}?plan={{ settings.PREMIUM_PRICE_ID }}">
{% ftlmsg 'banner-pack-upgrade-cta' %}
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion privaterelay/templates/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h2 class="section-headline dashboard-headline">{% ftlmsg 'profile-headline-mana
<input type="hidden" name="api_token" value="{{ user_profile.api_token }}">
{% if user_profile.at_max_free_aliases and not user_profile.has_unlimited %}
<a
href="https://accounts.stage.mozaws.net/subscriptions/products/{{ settings.PREMIUM_PROD_ID }}?plan={{ settings.PREMIUM_PRICE_ID }}"
href="{{ settings.FXA_SUBSCRIPTIONS_URL }}/products/{{ settings.PREMIUM_PROD_ID }}?plan={{ settings.PREMIUM_PRICE_ID }}"
target="_blank"
rel="noopener noreferrer""
class="btn btn-blue--ghost"
Expand Down

0 comments on commit 300fd7e

Please sign in to comment.