diff --git a/opentech/apply/activity/messaging.py b/opentech/apply/activity/messaging.py index ac07d77b037cc90f765faf4b9f99bfefd63fae25..1c2df58443331c25fc831c7c0e158cfc471afcde 100644 --- a/opentech/apply/activity/messaging.py +++ b/opentech/apply/activity/messaging.py @@ -23,7 +23,7 @@ class MESSAGES(Enum): NEW_REVIEW = 'New Review' COMMENT = 'Comment' PROPOSAL_SUBMITTED = 'Proposal Submitted' - OPENED_SEALED = 'Opened sealed application' + OPENED_SEALED = 'Opened Sealed Submission' @classmethod def choices(cls): @@ -112,7 +112,7 @@ class ActivityAdapter(AdapterBase): MESSAGES.INVITED_TO_PROPOSAL: 'Invited to submit a proposal', MESSAGES.REVIEWERS_UPDATED: 'reviewers_updated', MESSAGES.NEW_REVIEW: '{user} submitted a review', - MESSAGES.OPENED_SEALED: '{user} opened the application while still sealed', + MESSAGES.OPENED_SEALED: '{user} opened the submission while still sealed', } def recipients(self, message_type, **kwargs): @@ -161,7 +161,7 @@ class SlackAdapter(AdapterBase): MESSAGES.INVITED_TO_PROPOSAL: '<{link}|{submission.title}> by {submission.user} has been invited to submit a proposal', MESSAGES.NEW_REVIEW: '{user} has submitted a review for <{link}|{submission.title}>. Outcome: {review.outcome} Score: {review.score}', MESSAGES.READY_FOR_REVIEW: 'notify_reviewers', - MESSAGES.OPENED_SEALED: '{user} has opened the sealed application: <{link}|{submission.title}>' + MESSAGES.OPENED_SEALED: '{user} has opened the sealed submission: <{link}|{submission.title}>' } def __init__(self): diff --git a/opentech/apply/activity/migrations/0005_event.py b/opentech/apply/activity/migrations/0005_event.py index 2a863e33db5bbe128145407a3c4726576285d1f8..ffe2c1897edb991be3128ad5cc6ef04fc33c0d57 100644 --- a/opentech/apply/activity/migrations/0005_event.py +++ b/opentech/apply/activity/migrations/0005_event.py @@ -17,7 +17,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('when', models.DateTimeField(auto_now_add=True)), - ('type', models.CharField(choices=[('UPDATE_LEAD', 'Update Lead'), ('NEW_SUBMISSION', 'New Submission'), ('TRANSITION', 'Transition'), ('DETERMINATION_OUTCOME', 'Determination Outcome'), ('INVITED_TO_PROPOSAL', 'Invited To Proposal'), ('REVIEWERS_UPDATED', 'Reviewers Updated'), ('READY_FOR_REVIEW', 'Ready For Review'), ('NEW_REVIEW', 'New Review'), ('COMMENT', 'Comment'), ('PROPOSAL_SUBMITTED', 'Proposal Submitted'), ('OPENED_SEALED', 'Opened sealed application')], max_length=50)), + ('type', models.CharField(choices=[('UPDATE_LEAD', 'Update Lead'), ('NEW_SUBMISSION', 'New Submission'), ('TRANSITION', 'Transition'), ('DETERMINATION_OUTCOME', 'Determination Outcome'), ('INVITED_TO_PROPOSAL', 'Invited To Proposal'), ('REVIEWERS_UPDATED', 'Reviewers Updated'), ('READY_FOR_REVIEW', 'Ready For Review'), ('NEW_REVIEW', 'New Review'), ('COMMENT', 'Comment'), ('PROPOSAL_SUBMITTED', 'Proposal Submitted'), ('OPENED_SEALED', 'Opened Sealed Submission')], max_length=50)), ('by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), ('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='funds.ApplicationSubmission', related_name='+')), ], diff --git a/opentech/apply/funds/templates/funds/submission_sealed.html b/opentech/apply/funds/templates/funds/submission_sealed.html index 22aba8dec4d1fdea26e97b23db6c8c94a7eeb041..0323cd9e99516a4d060257c13145cdbab2b44c7d 100644 --- a/opentech/apply/funds/templates/funds/submission_sealed.html +++ b/opentech/apply/funds/templates/funds/submission_sealed.html @@ -21,7 +21,7 @@ <p>As an admin you are allowed to access the application. However, this action will be recorded.</p> <form method="post"> {% csrf_token %} - <input class="button button--warning" type="submit" value="View application"></input> + <input class="button button--warning" type="submit" value="View application" /> </form> {% endif %} </div> diff --git a/opentech/apply/funds/tests/test_views.py b/opentech/apply/funds/tests/test_views.py index 1087e98d3806fadf143d3b9044ca029540d390e2..039e0e9296a444564f61a98b4ccc29ad31fec04b 100644 --- a/opentech/apply/funds/tests/test_views.py +++ b/opentech/apply/funds/tests/test_views.py @@ -253,6 +253,8 @@ class TestSuperUserSealedView(BaseSubmissionViewTestCase): response = self.post_page(submission, {}, 'sealed') url = self.url_from_pattern('funds:submissions:detail', kwargs={'pk': submission.id}) self.assertRedirects(response, url) + self.assertTrue('peeked' in self.client.session) + self.assertTrue(str(submission.id) in self.client.session['peeked']) def test_not_asked_again(self): submission = SealedSubmissionFactory()