Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Removed resubmit form for packaged apps (bug 788381)
Browse files Browse the repository at this point in the history
  • Loading branch information
robhudson committed Oct 2, 2012
1 parent 03e458b commit 286d9e0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
16 changes: 9 additions & 7 deletions mkt/developers/templates/developers/apps/status.html
Expand Up @@ -57,10 +57,8 @@ <h2>{{ _('Current Status') }}</h2>
target="_blank">{{ _('Learn more') }}</a>
{% endif %}
{% if addon.status == amo.STATUS_REJECTED %}
<form method="post">
{{ csrf() }}
{% if rejection %}
<section class="island swagger" id="rejection">
<div class="island swagger" id="rejection">
<h3>
{% trans reviewer=rejection.user.name %}
Reviewed by <b>{{ reviewer }}</b>
Expand All @@ -72,17 +70,21 @@ <h3>
<blockquote>
{{ rejection.details.comments }}
</blockquote>
</section>
</div>
<p>
{% trans %}
Once you have addressed these concerns, you may resubmit your
app below.
{% endtrans %}
</p>
{% endif %}
{{ form_field(form.notes, opt=True) }}
<p><button type="submit" name="resubmit-app">{{ _('Resubmit App') }}</button></p>
</form>
{% if not addon.is_packaged %}
<form method="post">
{{ csrf() }}
{{ form_field(form.notes, opt=True) }}
<p><button type="submit" name="resubmit-app">{{ _('Resubmit App') }}</button></p>
</form>
{% endif %}
{% elif addon.status == amo.STATUS_PUBLIC_WAITING %}
<form method="post" action="{{ addon.get_dev_url('publicise') }}">
{{ csrf() }}
Expand Down
18 changes: 18 additions & 0 deletions mkt/developers/tests/test_views_versions.py
Expand Up @@ -108,6 +108,24 @@ def test_rejected(self):
'Files for reapplied apps should get marked as pending')
eq_(unicode(webapp.versions.all()[0].approvalnotes), my_reply)

def test_rejected_packaged(self):
self.webapp.update(is_packaged=True)
comments = "oh no you di'nt!!"
amo.set_user(UserProfile.objects.get(username='editor'))
amo.log(amo.LOG.REJECT_VERSION, self.webapp,
self.webapp.current_version, user_id=999,
details={'comments': comments, 'reviewtype': 'pending'})
self.webapp.update(status=amo.STATUS_REJECTED)
(self.webapp.versions.latest()
.all_files[0].update(status=amo.STATUS_DISABLED))

r = self.client.get(self.url)
eq_(r.status_code, 200)
doc = pq(r.content)('#version-status')
eq_(doc('.status-rejected').length, 1)
eq_(doc('#rejection').length, 1)
eq_(doc('#rejection blockquote').text(), comments)


class TestAddVersion(BasePackagedAppTest):

Expand Down

0 comments on commit 286d9e0

Please sign in to comment.