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.
allow voluntary, marketplace choice, add in docs (bug 677530)
- Loading branch information
Andy McKay
committed
Aug 16, 2011
1 parent
b3279bd
commit 1b9b02d
Showing
10 changed files
with
243 additions
and
141 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Empty file.
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,3 @@ | ||
{% extends "devhub/base.html" %} | ||
|
||
{% block title %}{{ docs_page_title(_('Marketplace')) }}{% endblock %} |
22 changes: 22 additions & 0 deletions
22
apps/devhub/templates/devhub/payments/marketplace-confirm.html
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,22 @@ | ||
<div id="marketplace-confirm" class="hidden"> | ||
<h3>{{ _('Mozilla Marketplace') }}</h3> | ||
<p>{% trans doc_url=url('devhub.docs', doc_name='marketplace'), | ||
agree_url=url('devhub.docs', doc_name='policies', doc_page='agreement') %} | ||
Thanks for your interest in selling your add-on in the Mozilla Marketplace. | ||
Please be sure to read our <a href="{{ doc_url }}">Marketplace Documentation and Policies</a> | ||
before continuing, as well as the <a href="{{ agree_url }}">Developer Agreement</a> you agreed | ||
to when first submitting this add-on. | ||
{% endtrans %}</p> | ||
<p>{% trans %}Please confirm this is the premium add-on you wish to sell.{% endtrans %}</p> | ||
<div class="indent"> | ||
<h4>{{ addon.name }}</h4> | ||
<p>{{ addon.guid }}</p> | ||
</div> | ||
<p>{% trans %}If this is the free version of your add-on, please create a new UUID | ||
for your premium add-on and submit it seperately before enrolling in Mozilla Marketplace. | ||
{% endtrans %}</p> | ||
<button id="marketplace-submit" type="submit">{{ _('Sell this Add-on') }}</button> | ||
{% trans %} | ||
or <a id="marketplace-cancel" href="#">Cancel</a> | ||
{% endtrans %} | ||
</div> |
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,92 @@ | ||
{% extends "devhub/base.html" %} | ||
|
||
{% set title = _('Manage Payments') %} | ||
{% block title %}{{ dev_page_title(title, addon) }}{% endblock %} | ||
|
||
{% set can_edit = (addon.status == amo.STATUS_PUBLIC | ||
and check_addon_ownership(request, addon)) %} | ||
{% block bodyclass %} | ||
{{ super() }}{% if not can_edit %} no-edit{% endif %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<header> | ||
{{ dev_breadcrumbs(addon, items=[(None, title)]) }} | ||
{{ l10n_menu(addon.default_locale) }} | ||
<h2>{{ title }}</h2> | ||
</header> | ||
<section class="primary payments devhub-form" role="main"> | ||
|
||
{% if not can_edit or not addon.has_full_profile() %} | ||
<div class="notification-box warning"> | ||
<h2> | ||
{% trans url=url('devhub.addons.profile', addon.slug) %} | ||
Payments are only available for fully reviewed add-ons with a <a href="{{ url }}">completed developer profile</a>. | ||
{% endtrans %} | ||
</h2> | ||
</div> | ||
{% endif %} | ||
|
||
{% set contrib = addon.takes_contributions and addon.has_full_profile() or errors %} | ||
{% if contrib and not errors %} | ||
<div id="status-bar"> | ||
<p> | ||
{{ _('You are currently requesting <b>contributions</b> from users')|safe }} | ||
<br> | ||
<span class="light"> | ||
{% trans url=url('addons.about', addon.slug), | ||
url_full=url('addons.about', addon.slug, host=settings.SITE_URL) %} | ||
Your contribution page: <a href="{{ url }}">{{ url_full }}</a> | ||
{% endtrans %} | ||
</span> | ||
</p> | ||
<form method="post" action="{{ url('devhub.addons.payments.disable', addon.slug) }}"> | ||
{{ csrf() }} | ||
<button type="submit">{{ _('Disable Contributions') }}</button> | ||
</form> | ||
</div> | ||
{% elif not errors %} | ||
<div class="intro"> | ||
<h3>{{ _('Voluntary Contributions') }}</h3> | ||
<p>{{ _('Add-ons enrolled in our contributions program can request voluntary finanical support from users.') }}</p> | ||
<ul> | ||
<li>{{ _('Encourage users to support your add-on through your Developer Profile') }}</li> | ||
<li>{{ _('Choose when and how users are asked to contribute') }}</li> | ||
<li>{{ _('Receive contributions in your PayPal account or send them to an organization of your choice') }}</li> | ||
</ul> | ||
<div class="button-wrapper"> | ||
<a href="#setup" id="do-setup" class="button prominent">{{ _('Set up Contributions') }}</a> | ||
</div> | ||
{% if waffle.switch('marketplace') %} | ||
<div class="learn-more"> | ||
{% trans doc_url=url('devhub.docs', doc_name='marketplace', doc_page='voluntary') %}or <a href="{{ doc_url }}">learn more</a>{% endtrans %} | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% if waffle.switch('marketplace') and addon.can_become_premium() %} | ||
<div class="intro"> | ||
<h3>{{ _('Mozilla Marketplace') }}</h3> | ||
<p>{{ _('Premium add-ons can be sold in our marketplace by themselves or as an upgrade to a free version of your add-on.') }}</p> | ||
<ul> | ||
<li>{{ _('Set your price and place your add-on for sale') }}</li> | ||
<li>{{ _('Users pay with their credit card or PayPal account all over the world') }}</li> | ||
<li>{{ _('Receive funds immediately in your PayPal account') }}</li> | ||
<li>{{ _("Promote your premium add-on on your free add-on's details page") }}</li> | ||
</ul> | ||
<div class="button-wrapper"> | ||
<a href="#marketplace-confirm" id="do-marketplace" class="button prominent">{{ _('Enroll in Marketplace') }}</a> | ||
</div> | ||
<div class="learn-more"> | ||
{% trans doc_url=url('devhub.docs', doc_name='marketplace') %}or <a href="{{ doc_url }}">learn more</a>{% endtrans %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% include "devhub/payments/voluntary.html" %} | ||
{% if waffle.switch('marketplace') and addon.can_become_premium() %} | ||
{% include "devhub/payments/marketplace-confirm.html" %} | ||
{% endif %} | ||
</section> | ||
{% include "devhub/includes/addons_edit_nav.html" %} | ||
{% endblock %} |
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,70 @@ | ||
<div id="setup" class="{{ 'hidden' if not contrib }}"> | ||
<h3>{{ _('Contributions') if contrib else _('Set up Contributions') }}</h3> | ||
<p class="{{ 'hidden' if contrib }}">{{ _('Fill in the fields below to begin asking for voluntary contributions from users.') }}</p> | ||
<form id="payments-setup-form" method="post" action="{{ url('devhub.addons.payments', addon.slug) }}"> | ||
{{ csrf() }} | ||
{% set values = contrib_form.data if contrib_form.is_bound else contrib_form.initial %} | ||
<div> | ||
{{ contrib_form.non_field_errors() }} | ||
{{ contrib_form.recipient.errors }} | ||
<b>{{ _('Who will receive contributions to this add-on?') }}</b> | ||
{{ contrib_form.recipient }} | ||
<div id="org-org" class="brform paypal {{ 'hidden' if (values.recipient != 'org') }}"> | ||
{{ charity_form.non_field_errors() }} | ||
{{ charity_form.name.errors }} | ||
<label for="id_charity-name">{{ _('What is the name of the organization?') }}</label> | ||
{{ charity_form.name }} | ||
{{ charity_form.url.errors }} | ||
<label for="id_charity-url">{{ _('What is the URL of the organization?') }}</label> | ||
{{ charity_form.url }} | ||
{{ charity_form.paypal.errors }} | ||
<label for="id_charity-paypal">{{ _('What is the PayPal ID of the organization?') }}</label> | ||
{{ charity_form.paypal }} | ||
</div> | ||
</div> | ||
<div id="org-dev" class="brform paypal {{ 'hidden' if (values.recipient != 'dev') }}"> | ||
{{ contrib_form.paypal_id.errors }} | ||
<label for="id_paypal_id">{{ _('What is your PayPal ID?') }}</label> | ||
<div>{{ contrib_form.paypal_id }} <a class="extra" href="{{ settings.PAYPAL_CGI_URL + '?cmd=_registration-run' }}">{{ _('Sign up for Paypal') }}</a></div> | ||
</div> | ||
<div class="brform"> | ||
{{ contrib_form.suggested_amount.errors }} | ||
<label for="id_suggested_amount">{{ _('What is your suggested contribution?') }}</label> | ||
<div class="extra">{{ contrib_form.suggested_amount.help_text }}</div> | ||
<div>{{ contrib_form.suggested_amount }} USD {{ _('(Example: 3.99)') }}</div> | ||
</div> | ||
<div class="nag"> | ||
{{ contrib_form.annoying.errors }} | ||
<b>{{ _('When should users be asked for contributions?') }}</b> | ||
<div class="extra">{{ contrib_form.annoying.help_text }}</div> | ||
{{ contrib_form.annoying }} | ||
</div> | ||
<div> | ||
<b>{{ _('Send a thank-you note?') }}</b><br> | ||
{{ contrib_form.enable_thankyou }} | ||
<label for="{{ contrib_form.enable_thankyou.auto_id }}"> | ||
{{ _("We'll automatically email users who contribute to your add-on with this message.") }}</label> | ||
<div class="thankyou-note {{ 'hidden' if not contrib_form.initial.enable_thankyou }}"> | ||
<div class="extra">{% trans %} | ||
We recommend thanking the user and telling them how much you appreciate their | ||
support. You might also want to tell them about what's next for your add-on and | ||
about any other add-ons you've made for them to try. | ||
{% endtrans %}</div> | ||
{{ contrib_form.thankyou_note.errors }} | ||
{{ contrib_form.thankyou_note }} | ||
<label data-for="thankyou_note"></label> | ||
</div> | ||
</div> | ||
{% if not addon.has_full_profile() %} | ||
{% with slim=True %} | ||
{% include "devhub/includes/addons_create_profile.html" %} | ||
{% endwith %} | ||
{% endif %} | ||
<button type="submit">{{ _('Save Changes') if contrib else _('Activate Contributions') }}</button> | ||
<span class="{{ 'hidden' if contrib }}"> | ||
{% trans %} | ||
or <a id="setup-cancel" href="#">Cancel</a> | ||
{% endtrans %} | ||
</span> | ||
</form> | ||
</div> |
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
Oops, something went wrong.