forked from mozilla/zamboni
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
1,286 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
{% if addon.charity %} | ||
{% set charity_url = addon.charity.outgoing_url %} | ||
{% set charity_name = addon.charity.name %} | ||
{% endif %} | ||
|
||
<div class="notice c" id="contribution"> | ||
<div class="aux{% if show_install %}-bottom{% endif %}"> | ||
<div class="button-wrapper"> | ||
<a class="button contribute prominent" id="contribute-button" | ||
href="{{ url('addons.contribute', addon.slug)|urlparams(src=src) }}"> | ||
<b></b>{{ _('Contribute') }} | ||
</a> | ||
{% if show_install %} | ||
{# L10n: Click Contribute button OR Install button #} | ||
<span class="continue">{{ _('or') }}</span> | ||
{% set ver = version or None %} | ||
{{ install_button(addon, version=ver, show_contrib=False) }} | ||
{% endif %} | ||
|
||
</div>{# /button-wrapper #} | ||
|
||
<p class="suggestion"> | ||
{% if has_suggested %} | ||
{% trans amt = addon.suggested_amount|currencyfmt('USD') %} | ||
<b>{{ amt }}</b> suggested | ||
{% endtrans %} | ||
{% endif %} | ||
</p>{# /suggestion #} | ||
</div>{# /aux #} | ||
|
||
<h3>{{ _('Enjoy this add-on?') }}</h3> | ||
<p class="{% if show_install %}show-install{% endif %}"> | ||
{% if text %} | ||
{{ text }} | ||
{% elif not addon.charity %} | ||
{{ _('The developer of this add-on asks that you help support its ' | ||
'continued development by making a small contribution.') }} | ||
{% elif addon.charity_id == amo.FOUNDATION_ORG %} | ||
{% trans %} | ||
The developer of this add-on asks that you show your support | ||
by making a donation to the <a href="{{ charity_url }}">{{ charity_name }}</a>. | ||
{% endtrans %} | ||
{% else %} | ||
{% trans %} | ||
The developer of this add-on asks that you show your support | ||
by making a small contribution to <a href="{{ charity_url }}">{{ charity_name }}</a>. | ||
{% endtrans %} | ||
{% endif %} | ||
</p> | ||
|
||
<div id="contribute-box" class="jqmWindow"> | ||
<form action="{{ url('addons.contribute', addon.slug) }}" method="get"> | ||
<input type="hidden" name="source" value="{{ request.GET.get('src', src) }}"/> | ||
<h2>{{ _('Make a Contribution') }}</h2> | ||
<p class="support"> | ||
{% with addon_name=addon.name, paypal_url='http://paypal.com' %} | ||
{% if not addon.charity %} | ||
{% trans %} | ||
Help support the continued development of | ||
<strong>{{ addon_name }}</strong> by making a small contribution | ||
through <a href="{{ paypal_url }}">Paypal</a>. | ||
{% endtrans %} | ||
{% elif addon.charity_id == amo.FOUNDATION_ORG %} | ||
{% trans %} | ||
To show your support for <b>{{ addon_name }}</b>, the developer asks | ||
that you make a donation to the <a href="{{ charity_url }}">{{ charity_name }}</a> | ||
through <a href="{{ paypal_url }}">Paypal</a>. | ||
{% endtrans %} | ||
{% else %} | ||
{% trans %} | ||
To show your support for <b>{{ addon_name }}</b>, the developer asks | ||
that you make a small contribution to <a href="{{ charity_url }}">{{ charity_name }}</a> | ||
through <a href="{{ paypal_url }}">Paypal</a>. | ||
{% endtrans %} | ||
{% endif %} | ||
{% endwith %} | ||
</p> | ||
|
||
<h4>{{ _('How much would you like to contribute?') }}</h4> | ||
<div class="error" id="contrib-too-much" | ||
data-max-amount="{{ settings.MAX_CONTRIBUTION }}"> | ||
{{ _('The maximum contribution amount is {0}.')|f( | ||
settings.MAX_CONTRIBUTION|currencyfmt('USD')) }} | ||
</div> | ||
<div class="error" id="contrib-too-little"> | ||
{{ _('The minimum contribution amount is {0}.')|f( | ||
0.01|currencyfmt('USD')) }} | ||
</div> | ||
<div class="error" id="contrib-not-entered"> | ||
{{ _('Contribution amount must be a number.') }} | ||
</div> | ||
<div class="error" id="paypal-error"> | ||
{{ _('There was an error communicating with paypal. Please try again later.') }} | ||
</div> | ||
<ul> | ||
{% if has_suggested %} | ||
<li> | ||
<input type="radio" name="type" value="suggested" | ||
id="contrib-suggested" checked="checked"/> | ||
<label for="contrib-suggested"> | ||
{# L10n: {1} is a currency amount (e.g., $5.00) #} | ||
{{ _('A one-time suggested contribution of {0}')|f( | ||
addon.suggested_amount|currencyfmt('USD')) }} | ||
</label> | ||
</li> | ||
{% endif %} | ||
<li> | ||
<input type="radio" name="type" value="onetime" | ||
id="contrib-onetime" | ||
{% if not has_suggested %}checked="checked"{% endif %}/> | ||
<label> | ||
{# L10n: {0} is a currency symbol (e.g., $), | ||
{1} is an amount input field #} | ||
{{ _('A one-time contribution of {0} {1}')|f( | ||
'$', '<input type="text" name="onetime-amount" value=""/>')|safe }} | ||
</label> | ||
</li> | ||
{% if not settings.PAYPAL_USE_EMBEDDED %} | ||
<li> | ||
<input type="radio" name="type" value="monthly" | ||
id="contrib-monthly"/> | ||
<label for="contrib-monthly"> | ||
{# L10n: {0} is a currency symbol (e.g., $), | ||
{1} is an amount input field #} | ||
{{ _('A regular monthly contribution of {0} {1}')|f( | ||
'$', '</label><input type="text" name="monthly-amount" value=""/>')|safe }} | ||
</li> | ||
{% endif %} | ||
</ul> | ||
|
||
<h4 class="comment"> | ||
<label for="contrib-comment"> | ||
{{ _('Leave a comment or request with your contribution.') }} | ||
</label> | ||
</h4><span>{{ _('(optional)') }}</span> | ||
<textarea name="comment" id="contrib-comment"></textarea> | ||
<span class="commentlen"></span> | ||
|
||
<button id="contribute-confirm" type="submit" class="prominent"> | ||
{{ _('Make Contribution') }} | ||
</button> | ||
<span class="cancel"><a href="#">{{ _('No Thanks') }}</a></span> | ||
</form> | ||
</div>{# /contribute-box #} | ||
|
||
|
||
|
||
</div>{# /notification #} | ||
|
||
<div class="hidden"> | ||
<div id="contribute-why" class="popup"> | ||
<p class="msg"> | ||
{% if addon.charity %} | ||
{% if addon.charity_id == amo.FOUNDATION_ORG %} | ||
{% trans %} | ||
The developer of this add-on would like you to consider making a | ||
donation to the <a href="{{ charity_url }}">{{ charity_name }}</a> | ||
if you enjoy using it. | ||
{% endtrans %} | ||
{% else %} | ||
{% trans %} | ||
The developer of this add-on would like you to consider making a | ||
small contribution to <a href="{{ charity_url }}">{{ charity_name }}</a> | ||
if you enjoy using it. | ||
{% endtrans %} | ||
{% endif %} | ||
{% else %} | ||
{% trans %} | ||
Mozilla is committed to supporting a vibrant and healthy developer | ||
ecosystem. Your optional contribution helps sustain further development | ||
of this add-on. | ||
{% endtrans %} | ||
{% endif %} | ||
</p> | ||
</div> | ||
</div> |
Oops, something went wrong.