remove old add-on submission flow from marketplace devhub (bug 733126)

This commit is contained in:
Chris Van 2012-03-06 20:00:11 -08:00
Родитель 272f083d2a
Коммит 9d69ca67e7
15 изменённых файлов: 4 добавлений и 581 удалений

Просмотреть файл

@ -1 +1 @@
from devhub.models import ActivityLog, SubmitStep
from devhub.models import ActivityLog

Просмотреть файл

@ -1,2 +0,0 @@
ALTER TABLE `submit_step` DROP FOREIGN KEY `submit_step_ibfk_1`;
ALTER TABLE `submit_step` ADD CONSTRAINT `submit_step_ibfk_1` FOREIGN KEY (`addon_id`) REFERENCES `addons` (`id`) ON DELETE CASCADE;

Просмотреть файл

@ -1,18 +0,0 @@
{% extends "developers/base.html" %}
{% set title = _('Submit a New App') %}
{% block title %}
{{ hub_page_title(title) }}
{% endblock %}
{% block content %}
{% set page_title = _('Submit App') %}
<header>
<h1>{{ title }}</h1>
</header>
{% include 'developers/addons/submit/sidebar.html' %}
<section class="primary submission-process">
{% block primary %}{% endblock %}
</section>
{% endblock %}

Просмотреть файл

@ -1,21 +0,0 @@
{% extends "developers/base.html" %}
{% block content %}
<h3>Let's talk about {{ addon.name }}</h3>
<p>Right now it's
{% if step %}
{% if addon.is_webapp() %}
on <b><a href="{{ url('mkt.developers.submit_apps.{0}'.format(step.step), addon.slug) }}">step {{ step.step }}</a></b>.
{% else %}
on <b><a href="{{ url('mkt.developers.submit.{0}'.format(step.step), addon.slug) }}">step {{ step.step }}</a></b>.
{% endif %}
{% else %}
not in the submission process.
{% endif %}
</p>
<form method="post" action="">
{{ csrf() }}
<p>I want this add-on to be on step <input type=numeric name=step size=1>.</p>
<p><button type=submit>Make it so</button></p>
</form>
{% endblock %}

Просмотреть файл

@ -1,101 +0,0 @@
{% from "developers/includes/macros.html" import some_html_tip, select_cats %}
{% extends "developers/addons/submit/base.html" %}
{% block title %}{{ hub_page_title(_('Step 3'), addon) }}{% endblock %}
{% block primary %}
<h3>{{ _('Step 3. Describe') }}</h3>
<form method="post" id="submit-describe" class="item" action="">
{{ csrf() }}
<div class="addon-submission-field">
<label for="id_name">{{ _("Name and version:") }}</label>
{{ form.name }}
{% set version = addon.current_version %}
<input type="text" disabled id="current_version"
value="{{ version.version }}" size="6">
{{ form.name.errors }}
</div>
{% if addon.is_webapp() and waffle.switch('marketplace') %}
<div class="addon-submission-field">
<label for="{{ form.homepage.auto_id }}">
{{ _('Homepage URL:') }}
</label>
{{ form.homepage }}
{{ form.homepage.errors }}
</div>
{% endif %}
<div class="addon-submission-field">
<label>{{ _("The detail page will be:") }}</label>
<div id="slug_edit" class="edit_with_prefix edit_initially_hidden">
<span>{{ settings.SITE_URL }}</span>{{ form.slug }}
<div class="edit-addon-details">
{{ _('Please use only letters, numbers, and dashes in your URL.') }}
</div>
</div>
<span id="slug_readonly">
{{ settings.SITE_URL }}/&hellip;/<span id="slug_value"></span>
<a id="edit_slug" href="#">{{ _('Edit') }}</a>
</span>
{{ form.slug.errors }}
</div>
{% if addon.is_webapp() and waffle.switch('marketplace') %}
<div class="addon-submission-field device-types">
<p><strong>{{ loc('Device Support:') }}</strong></p>
{{ device_form.device_types }}
{{ device_form.device_types.errors }}
</div>
{% endif %}
<div class="addon-submission-field">
<label>{{ _('Provide a brief summary:') }}</label>
{{ form.summary }}
{{ form.summary.errors }}
<div class="edit-addon-details">
{% trans %}
This summary will be shown in listings and searches.
{% endtrans %}
<div class="char-count"
data-for-startswith="{{ form.summary.auto_id }}_"
data-maxlength="{{ form.summary.field.max_length }}"></div>
</div>
</div>
<div id="addon-categories-edit" class="addon-submission-field"
data-max-categories="{{ amo.MAX_CATEGORIES }}">
{{ cat_form.non_form_errors() }}
{{ cat_form.management_form }}
{% for form in cat_form.initial_forms %}
{{ select_cats(amo.MAX_CATEGORIES, form, webapp) }}
{% endfor %}
</div>
<div class="addon-submission-field">
<label>{{ _('Provide a more detailed description:') }}</label>
{{ form.description }}
{{ form.description.errors }}
<div class="edit-addon-details">
{{ _("The description will appear on the detail page.") }}
{{ some_html_tip() }}
</div>
</div>
{% if addon.is_webapp() and waffle.switch('marketplace') %}
<div class="addon-submission-field">
<label for="{{ form.support_email.auto_id }}">
{{ _('Support Email:') }}
</label>
{{ form.support_email }}
{{ form.support_email.errors }}
</div>
<div class="addon-submission-field">
<label for="{{ form.support_url.auto_id }}">
{{ _('Support URL:') }}
</label>
{{ form.support_url }}
{{ form.support_url.errors }}
</div>
{% endif %}
<div class="submission-buttons addon-submission-field">
<button type="submit">
{{ _('Continue') }}
</button>
</div>
</form>
{% endblock primary %}

Просмотреть файл

@ -1,75 +0,0 @@
{% extends "developers/addons/submit/base.html" %}
{% block title %}
{{ hub_page_title(_('Submission Complete'), addon) }}
{% endblock %}
{% block primary %}
<h3>{{ _("You're done!") }}</h3>
{% if not webapp %}
<p>
{% if addon.status == amo.STATUS_UNREVIEWED %}
{% trans %}
Your add-on has been submitted to the Preliminary Review queue.
{% endtrans %}
{% elif addon.status == amo.STATUS_NOMINATED %}
{% trans %}
Your add-on has been submitted to the Full Review queue.
{% endtrans %}
{% endif %}
</p>
<p>
{% trans %}
You'll receive an email once it has been reviewed by an editor. In
the meantime, you and your friends can install it directly from its
details page:
{% endtrans %}
</p>
{% endif %}
<p>
<a id="submitted-addon-url" href="{{ addon.get_url_path() }}">
{{ addon.get_url_path()|absolutify|display_url }}</a>
</p>
<div class="done-next-steps">
<p><strong>{{ _('Next steps:') }}</strong></p>
<ul>
{% if is_platform_specific %}
{% set files_url = url('mkt.developers.versions.edit',
addon.slug, addon.current_version.id) %}
<li>{{ _('<a href="{0}">Upload</a> another platform-specific file to this version.')|f(files_url)|xssafe }}</li>
{% endif %}
{% set edit_url = addon.get_dev_url() %}
<li>{{ _('Provide more details by <a href="{0}">editing its listing</a>.')|f(edit_url)|safe }}</li>
{% set profile_url = addon.get_dev_url('profile') %}
<li>{{ _('Tell your users why you created this in your <a href="{0}">Developer Profile</a>.')|f(profile_url)|safe }}</li>
</ul>
</div>
{% if waffle.switch('marketplace') and addon.type in amo.ADDON_BECOME_PREMIUM %}
<div id="marketplace-enroll" class="action-needed">
<h3>{{ _('Enrolling in Marketplace') }}</h3>
{% with doc_url=url('mkt.developers.docs', doc_name='marketplace'),
payments_url=addon.get_dev_url('payments') %}
{% if webapp %}
<p>
{# TODO(apps): Finalize copy. #}
If this is a premium app you wish to sell in our Marketplace, be
sure to enroll on the <a href="{{ payments_url }}">Manage Payments</a>
page. {#<a href="{{ doc_url }}">Learn more</a>.#}
</p>
{% else %}
<p>
{% trans %}
If this is a premium add-on you wish to sell in our Marketplace, be
sure to enroll on the <a href="{{ payments_url }}">Manage Payments</a>
page <b>before</b> your add-on is reviewed by an editor.
{% endtrans %}
{# TODO(marketplace-docs):
<a href="{{ doc_url }}">Learn more</a>.
#}
</p>
{% endif %}
{% endwith %}
</div>
{% endif %}
{% endblock %}

Просмотреть файл

@ -1,63 +0,0 @@
{% from "developers/includes/macros.html" import some_html_tip %}
{% extends "developers/addons/submit/base.html" %}
{% block title %}{{ hub_page_title(_('Step 5'), addon) }}{% endblock %}
{% block primary %}
<h3>{{ _('Step 5. Select a License') }}</h3>
{% if license_form %}
<p>{% trans %}
We require all add-ons to indicate the terms under which their source code is
licensed. Please select a license from the list below or enter a custom license.
{% endtrans %}</p>
{% endif %}
<form method="post" class="item devhub-form submit-license" action="">
{{ csrf() }}
{% if license_form %}
<b>{{ _('Select a license for your add-on:') }}</b>
<div class="addon-submission-field">
{{ license_form.builtin.errors }}
{{ license_form.builtin }}
{% set show_other = (license_form.initial.builtin == license_other_val or
(license_form.errors and not license_form.builtin.errors)) %}
<div class="license-other {{ 'js-hidden' if not show_other }}"
data-val="{{ license_other_val }}">
{{ license_form.non_field_errors() }}
{{ license_form.name.errors }}
{{ license_form.name.label_tag() }}
{{ license_form.name }}
{{ license_form.text.errors }}
{{ license_form.text.label_tag() }}
{{ license_form.text }}
{{ some_html_tip() }}
</div>
</div>
{% endif %}
{% set values = policy_form.data if policy_form.is_bound else policy_form.initial %}
<div class="optional-terms">
<div>
{{ policy_form.has_eula }}
{{ policy_form.has_eula.label_tag() }}
<div class="eula {{ 'hidden' if not values.has_eula }}">
{{ policy_form.eula.errors }}
{{ policy_form.eula.label_tag() }}
{{ policy_form.eula }}
{{ some_html_tip() }}
</div>
</div>
<div class="addon-submission-field">
{{ policy_form.has_priv }}
{{ policy_form.has_priv.label_tag() }}
<div class="priv {{ 'hidden' if not values.has_priv }}">
{{ policy_form.privacy_policy.errors }}
{{ policy_form.privacy_policy.label_tag() }}
{{ policy_form.privacy_policy }}
</div>
</div>
</div>
<div class="submission-buttons addon-submission-field">
<button type="submit">{{ _('Continue') }}</button>
</div>
</form>
{% endblock %}

Просмотреть файл

@ -1,18 +0,0 @@
{% extends "developers/addons/submit/base.html" %}
{% block title %}{{ hub_page_title(_('Step 4'), addon) }}{% endblock %}
{% block primary %}
<h3>{{ _('Step 4. Add Images') }}</h3>
<form method="post" class="item" action="" enctype="multipart/form-data" id="submit-media">
<p>
{% trans %}
Custom icons and screenshots draw attention and help users
understand what it does. We strongly recommend uploading a custom icon, as in
some areas of the website, only the icon and name will appear.
{% endtrans %}
</p>
{% set context = 'submit' %}
{% include "developers/addons/forms_shared/media.html" %}
</form>
{% endblock primary %}

Просмотреть файл

@ -1,68 +0,0 @@
{% extends "developers/addons/submit/base.html" %}
{% set learn_more_url = remora_url('/developers/docs/policies/reviews#selection') %}
{% block title %}{{ hub_page_title(_('Step 6'), addon) }}{% endblock %}
{% block primary %}
<h3>{{ _('Step 6. Select a Review Process') }}</h3>
<p>
{% trans %}
All add-ons hosted in our gallery must be reviewed by an editor before
they appear in categories or search results. While waiting for review,
your add-on can still be accessed through its direct URL. Please choose
the review process below that best fits your add-on.
{% endtrans %}
</p>
<form class="select-review" action="" method="post">
{{ csrf() }}
{{ review_type_form.non_field_errors() }}
{{ review_type_form.review_type }}
{{ review_type_form.review_type.errors }}
<div class="review-type">
<div class="highlight">
<h4>{{ _('Full Review') }}</h4>
<p>
{% trans url=learn_more_url %}
A complete review of your add-on's source and functionality.
<a href="{{ url }}">Learn more&hellip;</a>
{% endtrans %}
</p>
<ul>
<li>{{ _('Appropriate for polished add-ons') }}</li>
<li>{{ _('Review should take place within 10 days') }}</li>
<li>{{ _('Review of subsequent versions within 5 days') }}</li>
<li>{{ _('Warning-free installation and no feature limitations') }}</li>
</ul>
<p class="submit-buttons">
<button type="submit" name="review_type" value="{{ amo.STATUS_NOMINATED }}">
{{ _('Choose Full Review') }}
</button>
</p>
</div>
</div>
<div class="review-type">
<div class="highlight">
<h4>{{ _('Preliminary Review') }}</h4>
<p>
{% trans url=learn_more_url %}
A faster review of your add-on's source for any major problems.
<a href="{{ url }}">Learn more&hellip;</a>
{% endtrans %}
</p>
<ul>
<li>{{ _('Appropriate for experimental add-ons') }}</li>
<li>{{ _('Review should take place within 3 days') }}</li>
<li>{{ _('Some feature limitations') }}</li>
<li>{{ _('Binary and obfuscated add-ons ineligible') }}</li>
<li>{{ _('Cannot request Full Review for 10 days') }}</li>
</ul>
<p class="submit-buttons">
<button type="submit" name="review_type" value="{{ amo.STATUS_UNREVIEWED }}">
{{ _('Choose Preliminary Review') }}
</button>
</p>
</div>
</div>
</form>
{% endblock %}

Просмотреть файл

@ -1,49 +0,0 @@
{# Steps below HAS_ADDON don't have an addon associated. Once we have an
addon we can't go back below that line. #}
{% set HAS_ADDON = 3 %}
{% if webapp %}
{% set NAV = (_('Getting Started'),
_('Link your app'),
_('Describe your app'),
_('Add images'),
_("You're done!")) %}
{% set MAX = 5 %}
{% set BASE = 'mkt.developers.submit_apps.%s' %}
{% else %}
{% set NAV = (_('Getting Started'),
_('Upload your add-on'),
_('Describe your add-on'),
_('Add images'),
_('Select a license'),
_('Select a review process'),
_("You're done!")) %}
{% set MAX = 7 %}
{% set BASE = 'mkt.developers.submit.%s' %}
{% endif %}
<div class="highlight">
<hgroup>
<h3>{{ _('Submission Process') }}</h3>
</hgroup>
<ol class="submit-addon-progress">
{% for text in NAV %}
<li {% if step.current == loop.index %}class="current"{% endif %}>
{% if step.current < HAS_ADDON %}
{% if loop.index <= step.current %}
<a href="{{ url(BASE % loop.index) }}">{{ text }}</a>
{% else %}
{{ text }}
{% endif %}
{% else %}
{# 1. We have an addon, so don't link to non-addon steps.
2. Don't link steps above the max step the addon has reached.
3. If step.max == MAX the addon is done, so we only show the final page. #}
{% if loop.index < HAS_ADDON or loop.index > step.max or step.max == MAX %}
{{ text }}
{% else %}
<a href="{{ url(BASE % loop.index, addon.slug) }}">{{ text }}</a>
{% endif %}
{% endif %}
</li>
{% endfor %}
</ol>
</div>

Просмотреть файл

@ -1,63 +0,0 @@
{% extends "developers/addons/submit/base.html" %}
{% block title %}{{ hub_page_title(_('Step 1'), addon) }}{% endblock %}
{% block primary %}
<h3>{{ _('Step 1. Getting Started') }}</h3>
{% if webapp %}
<p>
{% with url="https://developer.mozilla.org/en/apps/Manifest" %}
{{ loc('To list your app, we need to know where to find it. Give us the URL
to your <a href="{url}">manifest</a> below.</a>')|f(url=url)|safe }}
{% endwith %}
</p>
{% else %}
<p>
{% trans %}
Hosting your add-on in our gallery is the best way to expose your work
to millions of Firefox users. We'll provide everything you need to
distribute and update your add-on for free.
{% endtrans %}
</p>
<p>
{% trans %}
To complete this submission process you'll need your add-on
package (.xpi, .jar, or .xml) and at least one screenshot of
your add-on in action.
{% endtrans %}
</p>
{% endif %}
<p>
{% trans %}
When you're ready to begin, please read and accept our
<strong>Developer Agreement</strong>:
{% endtrans %}
</p>
<div id="agreement-container">
{% if webapp %}
{% include 'amo/developer_webapp_agreement.html' %}
{% else %}
{% include 'amo/developer_agreement.html' %}
{% endif %}
</div>
<div id="agreement-extra-links">
<a href="{{ url('mkt.developers.docs', 'policies', 'agreement') }}">
{{ _('Printable Version') }}</a>
{# TODO: Add link to "App Policies" once fligtar authors it (bug 699882). #}
{% if not webapp %}
<span>&bull;</span>
<a href="{{ url('mkt.developers.docs', 'policies') }}">
{{ _('Additional Add-on Policies') }}</a>
{% endif %}
</div>
<div class="submit-buttons">
<form method="post" action="">
{{ csrf() }}
<button id="accept-agreement" type="submit">
{{ _('I Accept this Agreement') }}
</button>
{{ _('or <a href="{0}">Cancel</a>')|f(url('mkt.developers.apps'))|safe }}
</form>
</div>
{% endblock %}

Просмотреть файл

@ -1,46 +0,0 @@
{% extends "developers/addons/submit/base.html" %}
{% block title %}{{ hub_page_title(_('Step 2'), addon) }}{% endblock %}
{% block primary %}
<form method="post" id="create-addon" class="item" action="">
{{ csrf() }}
<h3>{{ _('Step 2. Upload Your Add-on') }}</h3>
<p>
{% trans %}
Use the fields below to upload your add-on package and select any platform
restrictions. After upload, a series of automated validation tests will be run
on your file.
{% endtrans %}
</p>
<section id="upload-file">
<div class="hidden">
{{ new_addon_form.upload }}
</div>
<input type="file" id="upload-addon" data-upload-url="{{ url('mkt.developers.upload') }}">
{{ new_addon_form.non_field_errors() }}
<div class="platform">
<div class="desktop-platforms">
<label>{{ _('Which desktop platforms is this file compatible with?') }}</label>
{{ new_addon_form.errors.desktop_platforms }}
{{ new_addon_form.desktop_platforms }}
</div>
<div class="mobile-platforms">
<label>{{ _('Which mobile platforms is this file compatible with?') }}</label>
{{ new_addon_form.errors.mobile_platforms }}
{{ new_addon_form.mobile_platforms }}
</div>
{{ new_addon_form.upload }}
</div>
<div class="submission-buttons addon-submission-field">
<button class="addon-upload-dependant" id="submit-upload-file-finish" disabled=disabled type="submit">
{{ _('Continue') }}
</button>
</div>
</section>
</form>
{% endblock primary %}

Просмотреть файл

@ -1,44 +0,0 @@
{% extends "developers/addons/submit/base.html" %}
{% block title %}{{ hub_page_title(_('Step 2'), addon) }}{% endblock %}
{% block primary %}
{# TODO(apps): Finalize copy. #}
<h3>{{ _('Step 2. Link to Your App') }}</h3>
<p>
{% with url="https://developer.mozilla.org/en/apps/Manifest" %}
{{ loc('All you need to complete this process is a working
<a href="{url}">manifest</a> for your app.')|f(url=url)|safe }}
{% endwith %}
</p>
<section id="upload-file">
<div class="upload-status">
<label>{{ loc('Submit your app manifest by URL:') }}
<form id="validate-field">
<div class="vf-text">
<input id="upload-webapp-url" name="manifest" class="large"
placeholder="http://" data-upload-url="{{ url('mkt.developers.upload_manifest') }}">
</div>
<div class="vf-button">
<button type="submit" id="validate_app">{{ _('Validate') }}</button>
</div>
</form>
</label>
<div class="upload-details">
<div id="validate-error-protocol" class="pretty-tooltip tl">
<strong>Don't forget a protocol!</strong> Try adding either <a href="#">http://</a> or <a href="#">https://</a>.
</div>
<div>
{{ loc('App URLs must start with a protocol (for example, http:// or https://) and end with either .webapp or .json.') }}
</div>
</div>
</div>
<form method="post" id="upload-webapp" action="">
{{ csrf() }}
<div class="hidden">
{{ new_addon_form.upload }}
</div>
<button class="upload-file-submit" type="submit">{{ _('Continue') }}</button>
</form>
</section>
{% endblock primary %}

Просмотреть файл

Просмотреть файл

@ -326,10 +326,8 @@ def acquire_refund_permission(request, addon_id, addon, webapp=False):
"""This is the callback from Paypal."""
# Set up our redirects.
if request.GET.get('dest', '') == 'submission':
on_good = reverse('submit.app.payments.confirm',
args=[addon.app_slug])
on_error = reverse('submit.app.payments.paypal',
args=[addon.app_slug])
on_good = reverse('submit.app.payments.confirm', args=[addon.app_slug])
on_error = reverse('submit.app.payments.paypal', args=[addon.app_slug])
show_good_msgs = False
else:
# The management pages are the default.
@ -364,7 +362,7 @@ def acquire_refund_permission(request, addon_id, addon, webapp=False):
apd, created = AddonPaymentData.objects.safer_get_or_create(addon=addon)
# A sanity check, I'm not sure if this should be fatal and will
# occur on the prod server or it's just sandbox wierdness.
# occur on the prod server or it's just sandbox weirdness.
data = paypal.get_personal_data(token)
email = data.get('email')
if email != addon.paypal_id:
@ -1281,13 +1279,6 @@ def marketplace_confirm(request, addon_id, addon, webapp=False):
'upsell': addon.upsold, 'premium': addon.premium})
def _step_url(step, is_webapp):
url_base = 'mkt.developers.submit%s' % ('_apps' if is_webapp else '')
if is_webapp and str(step).isdigit() and step > 5:
step = 5
return '%s.%s' % (url_base, step)
@dev_required
@post_required
def remove_locale(request, addon_id, addon):