From 7ad0d483d7d9a4d9c2310e2a0669738ac2a3c4a9 Mon Sep 17 00:00:00 2001
From: Chad Whitacre
Date: Mon, 28 Aug 2017 08:05:13 -0400
Subject: [PATCH 01/31] Improve escaping while we're at it
Cf. #4585.
---
www/on/npm/%package.spt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/www/on/npm/%package.spt b/www/on/npm/%package.spt
index 9756f27809..6eb89e603a 100644
--- a/www/on/npm/%package.spt
+++ b/www/on/npm/%package.spt
@@ -124,7 +124,7 @@ if user.participant:
{% endif %}
{{ _( 'Addresses are from {a}{code}maintainers{_code}{_a}.'
- , a=('')|safe
+ , a=''|safe % package.remote_api_url
, _a=''|safe
, code=''|safe
, _code='
'|safe
@@ -132,7 +132,7 @@ if user.participant:
{{ _( 'Out of date? Update {a}at npm{_a} and refresh.'
- , a=('')|safe
+ , a=''|safe % package.remote_human_url
, _a=''|safe
) }}
From 687736630b8ded8d429c091628a2be1175f2748a Mon Sep 17 00:00:00 2001
From: Chad Whitacre
Date: Mon, 28 Aug 2017 08:56:28 -0400
Subject: [PATCH 02/31] Only start claims when address verified
If unverified, allow to use the package page to start verification.
---
js/gratipay/packages.js | 33 ++++++++----
js/gratipay/select.js | 9 ++--
scss/pages/package.scss | 6 +++
tests/ttw/test_package_claiming.py | 70 +++++++++++++++++++-------
www/on/npm/%package.spt | 28 +++++++----
www/~/%username/emails/modify.json.spt | 2 +-
6 files changed, 106 insertions(+), 42 deletions(-)
diff --git a/js/gratipay/packages.js b/js/gratipay/packages.js
index cb47b88453..55c59b5873 100644
--- a/js/gratipay/packages.js
+++ b/js/gratipay/packages.js
@@ -1,14 +1,20 @@
Gratipay.packages = {};
Gratipay.packages.initBulk = function() {
- $('button.apply').on('click', Gratipay.packages.postBulk);
+ $('.important-button button.apply').on('click', Gratipay.packages.postBulk);
};
Gratipay.packages.initSingle = function() {
- Gratipay.Select('.gratipay-select');
- $('button.apply').on('click', Gratipay.packages.postOne);
+ Gratipay.Select('.gratipay-select', Gratipay.packages.selectOne);
+ $('.important-button button').on('click', Gratipay.packages.postOne);
+ Gratipay.packages.selectOne($('.gratipay-select li.selected'));
};
+Gratipay.packages.selectOne = function($li) {
+ var action = $li.data('action');
+ $('.important-button span').hide();
+ $('.important-button span.' + action).show();
+};
Gratipay.packages.postBulk = function(e) {
e.preventDefault();
@@ -20,20 +26,25 @@ Gratipay.packages.postBulk = function(e) {
package_ids_by_email[pkg.email].push(pkg.packageId);
});
for (email in package_ids_by_email)
- Gratipay.packages.post(email, package_ids_by_email[email], true);
+ Gratipay.packages.post(email, package_ids_by_email[email], 'yes');
};
Gratipay.packages.postOne = function(e) {
e.preventDefault();
- var email = $('input[name=email]:checked').val();
- var package_id = $('input[name=package_id]').val();
- Gratipay.packages.post(email, [package_id]);
+ var $input = $('input[name=email]:checked');
+ var email = $input.val();
+ var package_ids;
+ var show_address_in_message = 'no';
+ if ($input.closest('li').data('action') === 'apply') {
+ package_ids = [$('input[name=package_id]').val()];
+ show_address_in_message = 'yes';
+ }
+ Gratipay.packages.post(email, package_ids, show_address_in_message);
}
-
-Gratipay.packages.post = function(email, package_ids, show_email) {
+Gratipay.packages.post = function(email, package_ids, show_address_in_message) {
var action = 'start-verification';
- var $button = $('button.apply')
+ var $button = $('.important-button button')
$button.prop('disabled', true);
function reenable() { $button.prop('disabled', false); }
@@ -43,7 +54,7 @@ Gratipay.packages.post = function(email, package_ids, show_email) {
data: { action: action
, address: email
, package_id: package_ids
- , show_address_in_message: true
+ , show_address_in_message: show_address_in_message
},
traditional: true,
dataType: 'json',
diff --git a/js/gratipay/select.js b/js/gratipay/select.js
index 25691a5c09..4a82daf1f7 100644
--- a/js/gratipay/select.js
+++ b/js/gratipay/select.js
@@ -1,6 +1,7 @@
-Gratipay.Select = function(selector) {
+Gratipay.Select = function(selector, onselect) {
var $ul = $('ul', selector);
var $labels = $('label', $ul);
+ var onselect = onselect || function() {};
// state for vertical position
var topFactor = 0; // float between 0 and $labels.length-1
@@ -51,9 +52,11 @@ Gratipay.Select = function(selector) {
function close($label) {
if ($label) {
- if ($label.closest('li').hasClass('disabled')) return;
+ var $li = $label.closest('li');
+ if ($li.hasClass('disabled')) return;
$('.selected', $ul).removeClass('selected')
- $label.closest('li').addClass('selected').removeClass('hover');
+ $li.addClass('selected').removeClass('hover');
+ onselect($li);
}
$ul.css({'top': 0}).removeClass('open');
$ul.unbind('mousewheel');
diff --git a/scss/pages/package.scss b/scss/pages/package.scss
index a9f1ccdfbe..bfa49920b3 100644
--- a/scss/pages/package.scss
+++ b/scss/pages/package.scss
@@ -14,6 +14,12 @@
color: $medium-gray;
}
+ .important-button {
+ span {
+ display: none;
+ }
+ }
+
.status-icon {
font-size: 12px;
line-height: 12px;
diff --git a/tests/ttw/test_package_claiming.py b/tests/ttw/test_package_claiming.py
index 472005955b..5d1b32f1ed 100644
--- a/tests/ttw/test_package_claiming.py
+++ b/tests/ttw/test_package_claiming.py
@@ -9,13 +9,25 @@
class Test(BrowserHarness):
- def check(self, choice=0):
- self.make_participant('alice', claimed_time='now')
+ def setUp(self):
+ BrowserHarness.setUp(self)
+ self.alice = self.make_participant( 'alice'
+ , claimed_time='now'
+ , email_address='alice@example.com'
+ )
+ self.add_and_verify_email(self.alice, 'bob@example.com')
self.sign_in('alice')
+
+ def choose(self, choice=0):
+ self.css('#content li.selected label').click() # activate select
+ want = self.css('#content label')[choice]
+ want.click()
+ return want.text
+
+ def check(self, choice=0):
self.visit('/on/npm/foo')
- self.css('#content label')[0].click() # activate select
- self.css('#content label')[choice].click()
- self.css('#content button')[0].click()
+ self.choose(choice)
+ self.css('#content .important-button button').click()
address = ('alice' if choice == 0 else 'bob') + '@example.com'
assert self.wait_for_success() == 'Check {} for a verification link.'.format(address)
return self.db.one('select address from claims c '
@@ -39,18 +51,42 @@ def test_can_send_to_second_email(self):
self.make_package(emails=['alice@example.com', 'bob@example.com'])
assert self.check(choice=1) == 'bob@example.com'
- def test_disabled_items_are_disabled(self):
- self.make_package(emails=['alice@example.com', 'bob@example.com'])
- alice = self.make_participant('alice', claimed_time='now')
- self.add_and_verify_email(alice, 'alice@example.com', 'bob@example.com')
- self.sign_in('alice')
+ def test_button_varies_with_email_state(self):
+ self.make_package(emails=['alice@example.com', 'bob@example.com', 'cat@example.com',
+ 'doug@example.com', 'edna@example.com'])
+ self.make_participant('doug', claimed_time='now', email_address='doug@example.com')
+ self.alice.start_email_verification('cat@example.com')
+ self.visit('/on/npm/foo')
+
+ self.choose(0) == 'alice@example.com'
+ self.css('li.selected').text.endswith('Your primary email address')
+ self.css('button').text == 'Apply to accept payments'
+
+ self.choose(1) == 'bob@example.com'
+ self.css('li.selected').text.endswith('Linked to your account')
+ self.css('button').text == 'Apply to accept payments'
+
+ self.choose(2) == 'cat@example.com'
+ self.css('li.selected').text.endswith('Verification pending')
+ self.css('button').text == 'Resend verification'
+
+ self.choose(3) == 'edna@example.com'
+ self.css('li.selected').text.endswith('Unverified')
+ self.css('button').text == 'Verify email address'
+
+ # doug is last, can't even be selected
+ self.choose(4) == 'doug@example.com'
+ self.css('li.selected label') == 'edna@example.com'
+ self.css('#content li')[4].text.endswith('Linked to a different account')
+
+ def test_sending_to_unverified_doesnt_start_a_claim(self):
+ self.make_package(emails=['alice@example.com', 'cat@example.com'])
self.visit('/on/npm/foo')
- self.css('#content label')[0].click() # activate select
- self.css('#content label')[1].click() # click second item
- self.css('#content li')[0].has_class('selected') # first item is still selected
- self.css('#content ul')[0].has_class('open') # still open
- self.css('#content button').has_class('disabled')
- assert self.db.all('select * from claims') == []
+ self.choose(1)
+ self.css('#content .important-button button').click()
+ assert self.wait_for_success() == 'Check your inbox for a verification link.'
+ assert self.db.one('select address from claims c '
+ 'join email_addresses e on c.nonce = e.nonce') is None
def test_claimed_packages_can_be_given_to(self):
@@ -79,7 +115,7 @@ def test_visiting_verify_link_shows_helpful_information(self):
self.make_package()
self.check()
- link = pickle.loads(self.db.one('select context from email_messages'))['link']
+ link = pickle.loads(self.db.all('select context from email_messages')[-1])['link']
link = link[len(self.base_url):] # strip because visit will add it back
self.visit(link)
diff --git a/www/on/npm/%package.spt b/www/on/npm/%package.spt
index 6eb89e603a..808077bd1c 100644
--- a/www/on/npm/%package.spt
+++ b/www/on/npm/%package.spt
@@ -22,7 +22,6 @@ banner = package.name
if user.participant:
emails = package.classify_emails_for_participant(user.participant)
- has_email_options = bool([x for x in emails if x[1] != OTHER])
[---] text/html
{% extends "templates/base.html" %}
@@ -77,7 +76,11 @@ if user.participant:
{% for i, (email, group) in enumerate(emails, start=1) %}
-
+ {% if i == 1 %}selected{% endif %}"
+ data-action="{{ 'apply' if group in (PRIMARY, VERIFIED) else
+ 'resend' if group == UNVERIFIED else
+ 'verify' if group == UNLINKED else
+ 'none' }}">
@@ -91,19 +94,22 @@ if user.participant:
{{ icons.STATUS_ICONS['failure']|safe }}
{{ _('Linked to a different account') }}
{% else %}
- {{ _('Ready to use') }}
{% if group == PRIMARY %}
- ·
+
{{ icons.STATUS_ICONS['feature']|safe }}
{{ _('Your primary email address') }}
{% elif group == VERIFIED %}
- ·
+
{{ icons.STATUS_ICONS['success']|safe }}
{{ _('Linked to your account') }}
{% elif group == UNVERIFIED %}
- ·
+
{{ icons.STATUS_ICONS['warning']|safe }}
- {{ _('Half-linked to your account') }}
+ {{ _('Verification pending') }}
+ {% elif group == UNLINKED %}
+
+ {{ icons.STATUS_ICONS['warning']|safe }}
+ {{ _('Unverified') }}
{% endif %}
{% endif %}
@@ -116,9 +122,11 @@ if user.participant:
-
{% endif %}
diff --git a/www/~/%username/emails/modify.json.spt b/www/~/%username/emails/modify.json.spt
index 77e904d609..735c312daa 100644
--- a/www/~/%username/emails/modify.json.spt
+++ b/www/~/%username/emails/modify.json.spt
@@ -12,7 +12,7 @@ participant = get_participant(state, restrict=True)
action = request.body['action']
address = request.body['address']
-show_address_in_message = bool(request.body.get('show_address_in_message', ''))
+show_address_in_message = request.body.get('show_address_in_message', '') == 'yes'
# Basic checks. The real validation will happen when we send the email.
if not is_valid_email_address(address):
From b62bb6de6e22f49dc50635c5c6f7511126efffca Mon Sep 17 00:00:00 2001
From: mattbk
Date: Fri, 15 Sep 2017 16:42:13 -0500
Subject: [PATCH 03/31] Stub shield into new ticket.
---
gratipay/project_review_process.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gratipay/project_review_process.py b/gratipay/project_review_process.py
index 756d7d2688..be53ffc60c 100644
--- a/gratipay/project_review_process.py
+++ b/gratipay/project_review_process.py
@@ -52,6 +52,8 @@ def start(self, *teams):
body.append('https://gratipay.com{}'.format(team.url_path))
assert len(owner_usernames) == 1, owner_usernames
body.extend(['', '(This application will remain open for at least a week.)'])
+ shield_string = "[![Gratipay](https://img.shields.io/gratipay/project/{}.svg)](https://gratipay.com/{}/)".format(teams[0].name,teams[0].name)
+ body.extend(['', shield_string])
data = json.dumps({'title': title, 'body': '\n'.join(body)})
review_url = self._poster.post(data)
From 4715c70c0d536c5b2f346df88ccab9b92096cbf3 Mon Sep 17 00:00:00 2001
From: mattbk
Date: Sat, 16 Sep 2017 15:42:09 -0500
Subject: [PATCH 04/31] Add example shield to project review ticket.
---
gratipay/project_review_process.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gratipay/project_review_process.py b/gratipay/project_review_process.py
index be53ffc60c..ba2146d8c6 100644
--- a/gratipay/project_review_process.py
+++ b/gratipay/project_review_process.py
@@ -51,9 +51,9 @@ def start(self, *teams):
owner_usernames.add(team.owner)
body.append('https://gratipay.com{}'.format(team.url_path))
assert len(owner_usernames) == 1, owner_usernames
- body.extend(['', '(This application will remain open for at least a week.)'])
- shield_string = "[![Gratipay](https://img.shields.io/gratipay/project/{}.svg)](https://gratipay.com/{}/)".format(teams[0].name,teams[0].name)
- body.extend(['', shield_string])
+ shield = "[![Gratipay](https://img.shields.io/gratipay/project{}.svg)](https://gratipay.com{})".format(teams[0].url_path,teams[0].url_path)
+ shield_markdown = "> "+shield
+ body.extend(['', '(This application will remain open for at least a week.)', 'Example [shield](http://shields.io)) for GitHub repositories: ', shield, shield_markdown])
data = json.dumps({'title': title, 'body': '\n'.join(body)})
review_url = self._poster.post(data)
From bffb288a9abd64b3e98c57a26df9185b0593c997 Mon Sep 17 00:00:00 2001
From: mattbk
Date: Mon, 18 Sep 2017 15:34:13 -0500
Subject: [PATCH 05/31] Modify test and fix code example.
---
gratipay/project_review_process.py | 2 +-
tests/py/test_project_review_process.py | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gratipay/project_review_process.py b/gratipay/project_review_process.py
index ba2146d8c6..709cf83ded 100644
--- a/gratipay/project_review_process.py
+++ b/gratipay/project_review_process.py
@@ -52,7 +52,7 @@ def start(self, *teams):
body.append('https://gratipay.com{}'.format(team.url_path))
assert len(owner_usernames) == 1, owner_usernames
shield = "[![Gratipay](https://img.shields.io/gratipay/project{}.svg)](https://gratipay.com{})".format(teams[0].url_path,teams[0].url_path)
- shield_markdown = "> "+shield
+ shield_markdown = '> `'+shield+'`'
body.extend(['', '(This application will remain open for at least a week.)', 'Example [shield](http://shields.io)) for GitHub repositories: ', shield, shield_markdown])
data = json.dumps({'title': title, 'body': '\n'.join(body)})
review_url = self._poster.post(data)
diff --git a/tests/py/test_project_review_process.py b/tests/py/test_project_review_process.py
index ddbd70a219..191ff35a88 100644
--- a/tests/py/test_project_review_process.py
+++ b/tests/py/test_project_review_process.py
@@ -59,7 +59,10 @@ def test_github_poster_attempts_to_post_to_github(self, post):
assert kwargs['data'] == (
'{"body": "https://gratipay.com/foo/\\nhttps://gratipay.com/bar/\\n'
'https://gratipay.com/baz/\\n\\n(This application will remain open '
- 'for at least a week.)", "title": "foo and 2 other projects"}')
+ 'for at least a week.)\\n\\nExample [shield](http://shields.io)) '
+ 'for GitHub repositories:\\n"'
+ '[![Gratipay](https://img.shields.io/gratipay/project/foo/.svg)](https://gratipay.com/foo/)'
+ '\n> `[![Gratipay](https://img.shields.io/gratipay/project/foo/.svg)](https://gratipay.com/foo/)`', "title": "foo and 2 other projects"}')
assert kwargs['auth'] == ('cheeseburger', 'di3tc0ke')
From 743b3662d908b5bf4c0e50d7e87f53eb4179c3d7 Mon Sep 17 00:00:00 2001
From: mattbk
Date: Mon, 18 Sep 2017 16:17:55 -0500
Subject: [PATCH 06/31] Fix quotes.
---
tests/py/test_project_review_process.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/py/test_project_review_process.py b/tests/py/test_project_review_process.py
index 191ff35a88..db33c8440a 100644
--- a/tests/py/test_project_review_process.py
+++ b/tests/py/test_project_review_process.py
@@ -60,9 +60,9 @@ def test_github_poster_attempts_to_post_to_github(self, post):
'{"body": "https://gratipay.com/foo/\\nhttps://gratipay.com/bar/\\n'
'https://gratipay.com/baz/\\n\\n(This application will remain open '
'for at least a week.)\\n\\nExample [shield](http://shields.io)) '
- 'for GitHub repositories:\\n"'
+ 'for GitHub repositories:\\n'
'[![Gratipay](https://img.shields.io/gratipay/project/foo/.svg)](https://gratipay.com/foo/)'
- '\n> `[![Gratipay](https://img.shields.io/gratipay/project/foo/.svg)](https://gratipay.com/foo/)`', "title": "foo and 2 other projects"}')
+ '\n> `[![Gratipay](https://img.shields.io/gratipay/project/foo/.svg)](https://gratipay.com/foo/)`", "title": "foo and 2 other projects"}')
assert kwargs['auth'] == ('cheeseburger', 'di3tc0ke')
From 46a4cf057e7a67b549fe150e47c7af383f000638 Mon Sep 17 00:00:00 2001
From: mattbk
Date: Mon, 18 Sep 2017 16:48:01 -0500
Subject: [PATCH 07/31] Escape line break. Tests not running locally for some
reason.
---
tests/py/test_project_review_process.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/py/test_project_review_process.py b/tests/py/test_project_review_process.py
index db33c8440a..e934ec49f4 100644
--- a/tests/py/test_project_review_process.py
+++ b/tests/py/test_project_review_process.py
@@ -62,7 +62,7 @@ def test_github_poster_attempts_to_post_to_github(self, post):
'for at least a week.)\\n\\nExample [shield](http://shields.io)) '
'for GitHub repositories:\\n'
'[![Gratipay](https://img.shields.io/gratipay/project/foo/.svg)](https://gratipay.com/foo/)'
- '\n> `[![Gratipay](https://img.shields.io/gratipay/project/foo/.svg)](https://gratipay.com/foo/)`", "title": "foo and 2 other projects"}')
+ '\\n> `[![Gratipay](https://img.shields.io/gratipay/project/foo/.svg)](https://gratipay.com/foo/)`", "title": "foo and 2 other projects"}')
assert kwargs['auth'] == ('cheeseburger', 'di3tc0ke')
From 55caabe5ece579df137ed937a97016d1505e4295 Mon Sep 17 00:00:00 2001
From: mattbk
Date: Tue, 19 Sep 2017 10:08:46 -0500
Subject: [PATCH 08/31] Fix test discrepancies.
---
gratipay/project_review_process.py | 2 +-
tests/py/test_project_review_process.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gratipay/project_review_process.py b/gratipay/project_review_process.py
index 709cf83ded..1661cf7e4a 100644
--- a/gratipay/project_review_process.py
+++ b/gratipay/project_review_process.py
@@ -53,7 +53,7 @@ def start(self, *teams):
assert len(owner_usernames) == 1, owner_usernames
shield = "[![Gratipay](https://img.shields.io/gratipay/project{}.svg)](https://gratipay.com{})".format(teams[0].url_path,teams[0].url_path)
shield_markdown = '> `'+shield+'`'
- body.extend(['', '(This application will remain open for at least a week.)', 'Example [shield](http://shields.io)) for GitHub repositories: ', shield, shield_markdown])
+ body.extend(['', '(This application will remain open for at least a week.)', 'Example [shield](http://shields.io)) for GitHub repositories:', shield, shield_markdown])
data = json.dumps({'title': title, 'body': '\n'.join(body)})
review_url = self._poster.post(data)
diff --git a/tests/py/test_project_review_process.py b/tests/py/test_project_review_process.py
index e934ec49f4..d16fb27782 100644
--- a/tests/py/test_project_review_process.py
+++ b/tests/py/test_project_review_process.py
@@ -59,7 +59,7 @@ def test_github_poster_attempts_to_post_to_github(self, post):
assert kwargs['data'] == (
'{"body": "https://gratipay.com/foo/\\nhttps://gratipay.com/bar/\\n'
'https://gratipay.com/baz/\\n\\n(This application will remain open '
- 'for at least a week.)\\n\\nExample [shield](http://shields.io)) '
+ 'for at least a week.)\\nExample [shield](http://shields.io)) '
'for GitHub repositories:\\n'
'[![Gratipay](https://img.shields.io/gratipay/project/foo/.svg)](https://gratipay.com/foo/)'
'\\n> `[![Gratipay](https://img.shields.io/gratipay/project/foo/.svg)](https://gratipay.com/foo/)`", "title": "foo and 2 other projects"}')
From fa571b388e1e76100d5a2e307662a42a17d51e41 Mon Sep 17 00:00:00 2001
From: mattbk
Date: Tue, 19 Sep 2017 15:55:37 -0500
Subject: [PATCH 09/31] Add widget page to project.
---
templates/team-base.html | 1 +
www/%team/widgets/index.html.spt | 34 +++++++++++++++++++++++++++
www/%team/widgets/index.html.spt~ | 38 +++++++++++++++++++++++++++++++
3 files changed, 73 insertions(+)
create mode 100644 www/%team/widgets/index.html.spt
create mode 100644 www/%team/widgets/index.html.spt~
diff --git a/templates/team-base.html b/templates/team-base.html
index d27fbd0d38..f467797da1 100644
--- a/templates/team-base.html
+++ b/templates/team-base.html
@@ -62,6 +62,7 @@
{% set pages = [ ('/', _('Profile'))
, ('/history/', _('History'))
, ('/receiving/', _('Receiving'))
+ , ('/widgets/', _('Widgets'))
] + ([('/distributing/', _('Distributing'))] if team.available else [])%}
{% if pages %}
{% include "templates/nav.html" %}
diff --git a/www/%team/widgets/index.html.spt b/www/%team/widgets/index.html.spt
new file mode 100644
index 0000000000..7fcfc294c3
--- /dev/null
+++ b/www/%team/widgets/index.html.spt
@@ -0,0 +1,34 @@
+from aspen import Response
+
+[-----------------------------------------------------------------------------]
+
+team = request.path['team']
+if team.is_approved in (None, False):
+ raise website.redirect('..')
+elif user.ANON:
+ raise Response(401)
+elif not (user.ADMIN or user.participant.username == team.owner):
+ raise Response(403)
+
+banner = team.name
+title = _("Widgets")
+
+[-----------------------------------------------------------------------------]
+{% extends "templates/team-base.html" %}
+{% block content %}
+
+Shields
+
+
+
+[![Gratipay](https://img.shields.io/gratipay/project/{{ team.slug }}.svg)](https://gratipay.com/{{ team.slug }}/)
+
+
+
+
+
+
+
+
+{% endblock %}
+
diff --git a/www/%team/widgets/index.html.spt~ b/www/%team/widgets/index.html.spt~
new file mode 100644
index 0000000000..d2e84b3fc5
--- /dev/null
+++ b/www/%team/widgets/index.html.spt~
@@ -0,0 +1,38 @@
+from aspen import Response
+
+[-----------------------------------------------------------------------------]
+
+team = request.path['team']
+if team.is_approved in (None, False):
+ raise website.redirect('..')
+elif user.ANON:
+ raise Response(401)
+elif not (user.ADMIN or user.participant.username == team.owner):
+ raise Response(403)
+
+banner = team.name
+title = _("Widgets")
+
+[-----------------------------------------------------------------------------]
+{% extends "templates/team-base.html" %}
+{% block content %}
+
+Shields
+
+
+
+[![Gratipay](https://img.shields.io/
+gratipay/project/{{ team.slug }}.svg)]
+(https://gratipay.com/{{ team.slug }}/)
+
+
+
+
+
+
+
+
+
+{% endblock %}
+
From 095ea8e8a8a91978deeae9ebd4d16ec5e6db4b52 Mon Sep 17 00:00:00 2001
From: mattbk
Date: Tue, 19 Sep 2017 15:57:41 -0500
Subject: [PATCH 10/31] Delete extra file.
---
www/%team/widgets/index.html.spt~ | 38 -------------------------------
1 file changed, 38 deletions(-)
delete mode 100644 www/%team/widgets/index.html.spt~
diff --git a/www/%team/widgets/index.html.spt~ b/www/%team/widgets/index.html.spt~
deleted file mode 100644
index d2e84b3fc5..0000000000
--- a/www/%team/widgets/index.html.spt~
+++ /dev/null
@@ -1,38 +0,0 @@
-from aspen import Response
-
-[-----------------------------------------------------------------------------]
-
-team = request.path['team']
-if team.is_approved in (None, False):
- raise website.redirect('..')
-elif user.ANON:
- raise Response(401)
-elif not (user.ADMIN or user.participant.username == team.owner):
- raise Response(403)
-
-banner = team.name
-title = _("Widgets")
-
-[-----------------------------------------------------------------------------]
-{% extends "templates/team-base.html" %}
-{% block content %}
-
-Shields
-
-
-
-[![Gratipay](https://img.shields.io/
-gratipay/project/{{ team.slug }}.svg)]
-(https://gratipay.com/{{ team.slug }}/)
-
-
-
-
-
-
-
-
-
-{% endblock %}
-
From 425070be50fed0b493e1b65aad3dbb974958aea6 Mon Sep 17 00:00:00 2001
From: mattbk
Date: Tue, 19 Sep 2017 16:09:01 -0500
Subject: [PATCH 11/31] Make widget page prettier.
---
www/%team/widgets/index.html.spt | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/www/%team/widgets/index.html.spt b/www/%team/widgets/index.html.spt
index 7fcfc294c3..d43c431c02 100644
--- a/www/%team/widgets/index.html.spt
+++ b/www/%team/widgets/index.html.spt
@@ -19,10 +19,19 @@ title = _("Widgets")
Shields
-
+Shields.io provides quality metadata badges for open source projects.
+This shield shows how much your project receives weekly:
+
+
+
+Copy the code below to use on your repository or website.
+
+Markdown
[![Gratipay](https://img.shields.io/gratipay/project/{{ team.slug }}.svg)](https://gratipay.com/{{ team.slug }}/)
+HTML
+
From 3b61d9bd19f393fc64e0fd954cd24673a26b07ef Mon Sep 17 00:00:00 2001
From: mattbk
Date: Tue, 19 Sep 2017 17:02:55 -0500
Subject: [PATCH 12/31] Fix trailing slash.
---
gratipay/project_review_process.py | 2 +-
tests/py/test_project_review_process.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gratipay/project_review_process.py b/gratipay/project_review_process.py
index 1661cf7e4a..e3aa8cf450 100644
--- a/gratipay/project_review_process.py
+++ b/gratipay/project_review_process.py
@@ -51,7 +51,7 @@ def start(self, *teams):
owner_usernames.add(team.owner)
body.append('https://gratipay.com{}'.format(team.url_path))
assert len(owner_usernames) == 1, owner_usernames
- shield = "[![Gratipay](https://img.shields.io/gratipay/project{}.svg)](https://gratipay.com{})".format(teams[0].url_path,teams[0].url_path)
+ shield = "[![Gratipay](https://img.shields.io/gratipay/project/{}.svg)](https://gratipay.com{})".format(teams[0].slug,teams[0].url_path)
shield_markdown = '> `'+shield+'`'
body.extend(['', '(This application will remain open for at least a week.)', 'Example [shield](http://shields.io)) for GitHub repositories:', shield, shield_markdown])
data = json.dumps({'title': title, 'body': '\n'.join(body)})
diff --git a/tests/py/test_project_review_process.py b/tests/py/test_project_review_process.py
index d16fb27782..0606f79a58 100644
--- a/tests/py/test_project_review_process.py
+++ b/tests/py/test_project_review_process.py
@@ -61,8 +61,8 @@ def test_github_poster_attempts_to_post_to_github(self, post):
'https://gratipay.com/baz/\\n\\n(This application will remain open '
'for at least a week.)\\nExample [shield](http://shields.io)) '
'for GitHub repositories:\\n'
- '[![Gratipay](https://img.shields.io/gratipay/project/foo/.svg)](https://gratipay.com/foo/)'
- '\\n> `[![Gratipay](https://img.shields.io/gratipay/project/foo/.svg)](https://gratipay.com/foo/)`", "title": "foo and 2 other projects"}')
+ '[![Gratipay](https://img.shields.io/gratipay/project/foo.svg)](https://gratipay.com/foo/)'
+ '\\n> `[![Gratipay](https://img.shields.io/gratipay/project/foo.svg)](https://gratipay.com/foo/)`", "title": "foo and 2 other projects"}')
assert kwargs['auth'] == ('cheeseburger', 'di3tc0ke')
From c994e433f399ae9cb8ed4f6655930cc91a72673b Mon Sep 17 00:00:00 2001
From: Chad Whitacre
Date: Thu, 28 Sep 2017 08:51:47 -0400
Subject: [PATCH 13/31] Format code and result
---
gratipay/project_review_process.py | 26 ++++++++++++++++++++++----
scss/pages/widgets.scss | 8 ++++++++
www/%team/widgets/index.html.spt | 27 ++++++++++++++-------------
www/assets/gratipay.css.spt | 1 +
4 files changed, 45 insertions(+), 17 deletions(-)
create mode 100644 scss/pages/widgets.scss
diff --git a/gratipay/project_review_process.py b/gratipay/project_review_process.py
index e3aa8cf450..586e867931 100644
--- a/gratipay/project_review_process.py
+++ b/gratipay/project_review_process.py
@@ -12,6 +12,9 @@
from gratipay.models.participant import Participant
+SHIELD = "[![Gratipay](https://img.shields.io/gratipay/project/{}.svg)](https://gratipay.com{})"
+
+
class ProjectReviewProcess(object):
def __init__(self, env, db, email_queue):
@@ -43,7 +46,10 @@ def start(self, *teams):
else:
title = "{} and {} other projects".format(teams[0].name, nteams-1)
- body = []
+ body = [ '*This application will remain open for at least a week.*'
+ , ''
+ , '## Project' + ('s' if nteams > 1 else '')
+ ]
team_ids = []
owner_usernames = set()
for team in teams:
@@ -51,9 +57,21 @@ def start(self, *teams):
owner_usernames.add(team.owner)
body.append('https://gratipay.com{}'.format(team.url_path))
assert len(owner_usernames) == 1, owner_usernames
- shield = "[![Gratipay](https://img.shields.io/gratipay/project/{}.svg)](https://gratipay.com{})".format(teams[0].slug,teams[0].url_path)
- shield_markdown = '> `'+shield+'`'
- body.extend(['', '(This application will remain open for at least a week.)', 'Example [shield](http://shields.io)) for GitHub repositories:', shield, shield_markdown])
+
+ shield = SHIELD.format(teams[0].slug, teams[0].url_path)
+ # let them discover how to adapt for additional projects
+ body += [ ''
+ , '## Badge'
+ , ''
+ , 'Add a [badge](http://shields.io/) to your README?'
+ , ''
+ , shield
+ , ''
+ , '```markdown'
+ , shield
+ , '```'
+ ]
+
data = json.dumps({'title': title, 'body': '\n'.join(body)})
review_url = self._poster.post(data)
diff --git a/scss/pages/widgets.scss b/scss/pages/widgets.scss
new file mode 100644
index 0000000000..87bef3c08b
--- /dev/null
+++ b/scss/pages/widgets.scss
@@ -0,0 +1,8 @@
+#widgets {
+ textarea {
+ font: normal 10px/12px $Mono;
+ width: 100%;
+ padding: 10px;
+ height: 60px;
+ }
+}
diff --git a/www/%team/widgets/index.html.spt b/www/%team/widgets/index.html.spt
index d43c431c02..4c34514589 100644
--- a/www/%team/widgets/index.html.spt
+++ b/www/%team/widgets/index.html.spt
@@ -11,33 +11,34 @@ elif not (user.ADMIN or user.participant.username == team.owner):
raise Response(403)
banner = team.name
+page_id = 'widgets'
title = _("Widgets")
[-----------------------------------------------------------------------------]
{% extends "templates/team-base.html" %}
{% block content %}
-Shields
+Shields.io provides quality metadata badges
+for open source projects. This badge shows how much your project receives
+weekly:
-Shields.io provides quality metadata badges for open source projects.
-This shield shows how much your project receives weekly:
+
+
+
+
+
-
+Copy the code below to use on your repository README or website.
-Copy the code below to use on your repository or website.
-
-Markdown
-
-[![Gratipay](https://img.shields.io/gratipay/project/{{ team.slug }}.svg)](https://gratipay.com/{{ team.slug }}/)
-
-HTML
-
-
+Markdown
+
+HTML
+
{% endblock %}
diff --git a/www/assets/gratipay.css.spt b/www/assets/gratipay.css.spt
index 90209eb93b..b011bac6bc 100644
--- a/www/assets/gratipay.css.spt
+++ b/www/assets/gratipay.css.spt
@@ -78,3 +78,4 @@
@import "scss/pages/on-confirm";
@import "scss/pages/search";
@import "scss/pages/hall-of-fame";
+@import "scss/pages/widgets";
From 91c9cad505b351f4675d09d8d7b77988b7737507 Mon Sep 17 00:00:00 2001
From: Chad Whitacre
Date: Thu, 28 Sep 2017 16:44:59 -0400
Subject: [PATCH 14/31] Update test to match new output
---
gratipay/project_review_process.py | 1 +
tests/py/test_project_review_process.py | 15 +++++++++------
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/gratipay/project_review_process.py b/gratipay/project_review_process.py
index 586e867931..dd0de5c835 100644
--- a/gratipay/project_review_process.py
+++ b/gratipay/project_review_process.py
@@ -49,6 +49,7 @@ def start(self, *teams):
body = [ '*This application will remain open for at least a week.*'
, ''
, '## Project' + ('s' if nteams > 1 else '')
+ , ''
]
team_ids = []
owner_usernames = set()
diff --git a/tests/py/test_project_review_process.py b/tests/py/test_project_review_process.py
index 0606f79a58..257ff85b88 100644
--- a/tests/py/test_project_review_process.py
+++ b/tests/py/test_project_review_process.py
@@ -57,12 +57,15 @@ def test_github_poster_attempts_to_post_to_github(self, post):
args, kwargs = post.mock_calls[0][1:]
assert args[0] == 'https://api.github.com/repos/some/repo/issues'
assert kwargs['data'] == (
- '{"body": "https://gratipay.com/foo/\\nhttps://gratipay.com/bar/\\n'
- 'https://gratipay.com/baz/\\n\\n(This application will remain open '
- 'for at least a week.)\\nExample [shield](http://shields.io)) '
- 'for GitHub repositories:\\n'
- '[![Gratipay](https://img.shields.io/gratipay/project/foo.svg)](https://gratipay.com/foo/)'
- '\\n> `[![Gratipay](https://img.shields.io/gratipay/project/foo.svg)](https://gratipay.com/foo/)`", "title": "foo and 2 other projects"}')
+ '{"body": "*This application will remain open for at least a week.*\\n\\n'
+ '## Projects\\n\\nhttps://gratipay.com/foo/\\nhttps://gratipay.com/bar/\\n'
+ 'https://gratipay.com/baz/\\n\\n'
+ '## Badge\\n\\n'
+ 'Add a [badge](http://shields.io/) to your README?\\n\\n'
+ '[![Gratipay](https://img.shields.io/gratipay/project/foo.svg)](https://gratipay.com/foo/)\\n\\n'
+ '```markdown\\n'
+ '[![Gratipay](https://img.shields.io/gratipay/project/foo.svg)](https://gratipay.com/foo/)\\n'
+ '```", "title": "foo and 2 other projects"}')
assert kwargs['auth'] == ('cheeseburger', 'di3tc0ke')
From be69e9e8dffb54f252d36fae61bce89ad95d7751 Mon Sep 17 00:00:00 2001
From: Chad Whitacre
Date: Thu, 28 Sep 2017 12:39:16 -0400
Subject: [PATCH 15/31] Simplify the newsletter field
Closes #4654.
---
deploy/before.sql | 5 +++++
gratipay/homepage.py | 10 +++++-----
gratipay/models/payment_for_open_source.py | 7 ++++---
gratipay/testing/harness.py | 2 +-
scss/pages/homepage.scss | 4 ++--
tests/py/test_www_homepage.py | 13 +++++++------
www/index.spt | 22 +++++++++-------------
7 files changed, 33 insertions(+), 30 deletions(-)
create mode 100644 deploy/before.sql
diff --git a/deploy/before.sql b/deploy/before.sql
new file mode 100644
index 0000000000..2e5aa2cc99
--- /dev/null
+++ b/deploy/before.sql
@@ -0,0 +1,5 @@
+BEGIN;
+ ALTER TABLE payments_for_open_source ADD COLUMN on_mailing_list bool NOT NULL DEFAULT TRUE;
+ UPDATE payments_for_open_source SET on_mailing_list=true WHERE follow_up != 'never';
+ ALTER TABLE payments_for_open_source DROP COLUMN follow_up;
+END;
diff --git a/gratipay/homepage.py b/gratipay/homepage.py
index deab32e05d..8ea27a3aa6 100644
--- a/gratipay/homepage.py
+++ b/gratipay/homepage.py
@@ -45,10 +45,10 @@ def _parse(raw):
email_address = email_address[:255]
errors.append('email_address')
- follow_up = x('follow_up')
- if follow_up not in ('quarterly', 'yearly', 'never'):
- follow_up = 'quarterly'
- errors.append('follow_up')
+ on_mailing_list = x('on_mailing_list')
+ if on_mailing_list not in ('yes', 'no'):
+ on_mailing_list = 'yes'
+ errors.append('on_mailing_list')
# promo fields
promotion_name = x('promotion_name')
@@ -78,7 +78,7 @@ def _parse(raw):
, 'grateful_for': grateful_for
, 'name': name
, 'email_address': email_address
- , 'follow_up': follow_up
+ , 'on_mailing_list': on_mailing_list
, 'promotion_name': promotion_name
, 'promotion_url': promotion_url
, 'promotion_twitter': promotion_twitter
diff --git a/gratipay/models/payment_for_open_source.py b/gratipay/models/payment_for_open_source.py
index f6ecc4caa0..0dd1ce41a3 100644
--- a/gratipay/models/payment_for_open_source.py
+++ b/gratipay/models/payment_for_open_source.py
@@ -38,20 +38,21 @@ def from_uuid(cls, uuid, cursor=None):
@classmethod
- def insert(cls, amount, grateful_for, name, follow_up, email_address,
+ def insert(cls, amount, grateful_for, name, on_mailing_list, email_address,
promotion_name, promotion_url, promotion_twitter, promotion_message,
cursor=None):
"""Take baseline info and insert into the database.
"""
uuid = uuid4().hex
+ on_mailing_list = on_mailing_list == 'yes'
return (cursor or cls.db).one("""
INSERT INTO payments_for_open_source
- (uuid, amount, grateful_for, name, follow_up, email_address,
+ (uuid, amount, grateful_for, name, on_mailing_list, email_address,
promotion_name, promotion_url, promotion_twitter, promotion_message)
VALUES (%s, %s, %s, %s, %s, %s,
%s, %s, %s, %s)
RETURNING payments_for_open_source.*::payments_for_open_source
- """, (uuid, amount, grateful_for, name, follow_up, email_address,
+ """, (uuid, amount, grateful_for, name, on_mailing_list, email_address,
promotion_name, promotion_url, promotion_twitter, promotion_message))
diff --git a/gratipay/testing/harness.py b/gratipay/testing/harness.py
index ecd670d61c..99254dd8e5 100644
--- a/gratipay/testing/harness.py
+++ b/gratipay/testing/harness.py
@@ -148,7 +148,7 @@ def make_payment_for_open_source(self, **info):
, grateful_for='open source!'
, name='Alice Liddell'
, email_address='alice@example.com'
- , follow_up='quarterly'
+ , on_mailing_list=True
, promotion_name='Wonderland'
, promotion_url='http://www.example.com/'
, promotion_twitter='thebestbutter'
diff --git a/scss/pages/homepage.scss b/scss/pages/homepage.scss
index 0cbb682dcb..5ec58a6a2d 100644
--- a/scss/pages/homepage.scss
+++ b/scss/pages/homepage.scss
@@ -236,12 +236,12 @@
text-align: center;
}
}
- &.email_address, &.follow_up {
+ &.email_address, &.on_mailing_list {
.fine-print {
text-align: left;
}
}
- &.follow_up {
+ &.on_mailing_list {
text-align: left;
.fancy-radio {
position: relative;
diff --git a/tests/py/test_www_homepage.py b/tests/py/test_www_homepage.py
index 271b87bfb6..aeaa98ac10 100644
--- a/tests/py/test_www_homepage.py
+++ b/tests/py/test_www_homepage.py
@@ -19,7 +19,7 @@
, 'grateful_for': 'python, javascript'
, 'name': 'Alice Liddell'
, 'email_address': 'alice@example.com'
- , 'follow_up': 'yearly'
+ , 'on_mailing_list': 'yes'
, 'promotion_name': 'Wonderland'
, 'promotion_url': 'http://www.example.com/'
, 'promotion_twitter': 'thebestbutter'
@@ -30,7 +30,7 @@
, 'grateful_for': 'x' * (16 * 2**10) + 'x'
, 'name': 'Alice Liddell' * 20
, 'email_address': 'alice' * 100 + '@example.com'
- , 'follow_up': 'cheese'
+ , 'on_mailing_list': 'cheese'
, 'promotion_name': 'Wonderland' * 100
, 'promotion_url': 'http://www.example.com/' + 'cheese' * 100
, 'promotion_twitter': 'thebestbutter' * 10
@@ -41,7 +41,7 @@
, 'grateful_for': ''
, 'name': ''
, 'email_address': ''
- , 'follow_up': 'quarterly'
+ , 'on_mailing_list': 'no'
, 'promotion_name': ''
, 'promotion_url': ''
, 'promotion_twitter': ''
@@ -52,13 +52,14 @@
, 'grateful_for': 'x' * (16 * 2**10)
, 'name': 'Alice Liddell' * 19 + 'Alice Li'
, 'email_address': 'alice' * 51
- , 'follow_up': 'quarterly'
+ , 'on_mailing_list': 'yes'
, 'promotion_name': 'WonderlandWonderlandWonderlandWo'
, 'promotion_url': 'http://www.example.com/' + 'cheese' * 38 + 'chee'
, 'promotion_twitter': 'thebestbutterthebestbutterthebes'
, 'promotion_message': 'Love me!' * 16
}
-ALL = ['amount', 'payment_method_nonce', 'grateful_for', 'name', 'email_address', 'follow_up',
+ALL = ['amount', 'payment_method_nonce',
+ 'grateful_for', 'name', 'email_address', 'on_mailing_list',
'promotion_name', 'promotion_url', 'promotion_twitter', 'promotion_message']
@@ -125,7 +126,7 @@ def test_stores_info(self):
parsed.pop('payment_method_nonce')
assert self.fetch() is None
_store(parsed)
- assert self.fetch().follow_up == 'yearly'
+ assert self.fetch().on_mailing_list
class Send(QueuedEmailHarness):
diff --git a/www/index.spt b/www/index.spt
index d7ee6377e9..a82e8d4535 100644
--- a/www/index.spt
+++ b/www/index.spt
@@ -238,24 +238,20 @@ $(document).ready(function() {
-
+
From c8cf68e15caca15c282cf9e30183e23490c8c7c1 Mon Sep 17 00:00:00 2001
From: Chad Whitacre
Date: Thu, 28 Sep 2017 14:42:59 -0400
Subject: [PATCH 16/31] Fix logic in new column backfill
---
deploy/before.sql | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/deploy/before.sql b/deploy/before.sql
index 2e5aa2cc99..bf893f6e08 100644
--- a/deploy/before.sql
+++ b/deploy/before.sql
@@ -1,5 +1,5 @@
BEGIN;
ALTER TABLE payments_for_open_source ADD COLUMN on_mailing_list bool NOT NULL DEFAULT TRUE;
- UPDATE payments_for_open_source SET on_mailing_list=true WHERE follow_up != 'never';
+ UPDATE payments_for_open_source SET on_mailing_list=false WHERE follow_up = 'never';
ALTER TABLE payments_for_open_source DROP COLUMN follow_up;
END;
From fc820f584b6f3e2eefc27afd619dfde2cc712bd1 Mon Sep 17 00:00:00 2001
From: Chad Whitacre
Date: Thu, 28 Sep 2017 18:57:53 -0400
Subject: [PATCH 17/31] Update i18n files
---
i18n/core/de.po | 41 +++++++++++++++++++----------------------
i18n/core/es.po | 41 +++++++++++++++++++----------------------
i18n/core/fr.po | 41 +++++++++++++++++++----------------------
i18n/core/it.po | 47 ++++++++++++++++++++++-------------------------
i18n/core/ja.po | 41 +++++++++++++++++++----------------------
i18n/core/nl.po | 41 +++++++++++++++++++----------------------
6 files changed, 117 insertions(+), 135 deletions(-)
diff --git a/i18n/core/de.po b/i18n/core/de.po
index bb525b6d69..79d559e6b7 100644
--- a/i18n/core/de.po
+++ b/i18n/core/de.po
@@ -822,22 +822,19 @@ msgstr ""
msgid "You will get a link to an invoice for your payment."
msgstr ""
-msgid "Follow-up"
+msgid "Join Mailing List"
msgstr ""
-msgid "Quarterly"
-msgstr ""
-
-msgid "Yearly"
-msgstr ""
+msgid "Yes"
+msgstr "Ja"
-msgid "Never"
-msgstr ""
+msgid "No"
+msgstr "Nein"
msgid "I am surprised that you are seeing this message."
msgstr ""
-msgid "You will get a progress report, with a reminder to pay again."
+msgid "We send updates related to #BackTheStack."
msgstr ""
msgid "Promotion"
@@ -1007,12 +1004,6 @@ msgstr "Hinzufügen"
msgid "Are you sure?"
msgstr "Sind Sie sicher?"
-msgid "Yes"
-msgstr "Ja"
-
-msgid "No"
-msgstr "Nein"
-
msgid "Already closed."
msgstr "Bereits geschlossen."
@@ -1270,21 +1261,30 @@ msgstr ""
msgid "Linked to a different account"
msgstr ""
-msgid "Ready to use"
-msgstr ""
-
msgid "Your primary email address"
msgstr ""
msgid "Linked to your account"
msgstr ""
-msgid "Half-linked to your account"
+msgid "Verification pending"
msgstr ""
+msgid "Unverified"
+msgstr "Unverifiziert"
+
msgid "Apply to accept payments"
msgstr ""
+msgid "Resend verification"
+msgstr ""
+
+msgid "Verify email address"
+msgstr ""
+
+msgid "Dead-end, sorry"
+msgstr ""
+
msgid "Addresses are from {a}{code}maintainers{_code}{_a}."
msgstr ""
@@ -1615,9 +1615,6 @@ msgstr "Identitäten"
msgid "Verified"
msgstr "Verifiziert"
-msgid "Unverified"
-msgstr "Unverifiziert"
-
msgid "Add Identity"
msgstr "Identität Hinzufügen"
diff --git a/i18n/core/es.po b/i18n/core/es.po
index 3c01985219..77fa936421 100644
--- a/i18n/core/es.po
+++ b/i18n/core/es.po
@@ -818,22 +818,19 @@ msgstr ""
msgid "You will get a link to an invoice for your payment."
msgstr ""
-msgid "Follow-up"
+msgid "Join Mailing List"
msgstr ""
-msgid "Quarterly"
-msgstr ""
-
-msgid "Yearly"
-msgstr ""
+msgid "Yes"
+msgstr "Sí"
-msgid "Never"
-msgstr ""
+msgid "No"
+msgstr "No"
msgid "I am surprised that you are seeing this message."
msgstr ""
-msgid "You will get a progress report, with a reminder to pay again."
+msgid "We send updates related to #BackTheStack."
msgstr ""
msgid "Promotion"
@@ -1003,12 +1000,6 @@ msgstr "Añadir"
msgid "Are you sure?"
msgstr "¿Estás seguro?"
-msgid "Yes"
-msgstr "Sí"
-
-msgid "No"
-msgstr "No"
-
msgid "Already closed."
msgstr "Ya está cerrado."
@@ -1266,21 +1257,30 @@ msgstr ""
msgid "Linked to a different account"
msgstr ""
-msgid "Ready to use"
-msgstr ""
-
msgid "Your primary email address"
msgstr ""
msgid "Linked to your account"
msgstr ""
-msgid "Half-linked to your account"
+msgid "Verification pending"
msgstr ""
+msgid "Unverified"
+msgstr "No verificado"
+
msgid "Apply to accept payments"
msgstr ""
+msgid "Resend verification"
+msgstr ""
+
+msgid "Verify email address"
+msgstr ""
+
+msgid "Dead-end, sorry"
+msgstr ""
+
msgid "Addresses are from {a}{code}maintainers{_code}{_a}."
msgstr ""
@@ -1611,9 +1611,6 @@ msgstr "Identidades"
msgid "Verified"
msgstr "Verificado"
-msgid "Unverified"
-msgstr "No verificado"
-
msgid "Add Identity"
msgstr "Añadir Identidad"
diff --git a/i18n/core/fr.po b/i18n/core/fr.po
index c991ff1fbb..126e1cd17b 100644
--- a/i18n/core/fr.po
+++ b/i18n/core/fr.po
@@ -818,22 +818,19 @@ msgstr ""
msgid "You will get a link to an invoice for your payment."
msgstr ""
-msgid "Follow-up"
+msgid "Join Mailing List"
msgstr ""
-msgid "Quarterly"
-msgstr ""
-
-msgid "Yearly"
-msgstr ""
+msgid "Yes"
+msgstr "Oui"
-msgid "Never"
-msgstr ""
+msgid "No"
+msgstr "Non"
msgid "I am surprised that you are seeing this message."
msgstr ""
-msgid "You will get a progress report, with a reminder to pay again."
+msgid "We send updates related to #BackTheStack."
msgstr ""
msgid "Promotion"
@@ -1003,12 +1000,6 @@ msgstr "Ajouter"
msgid "Are you sure?"
msgstr "Êtes-vous sûr ?"
-msgid "Yes"
-msgstr "Oui"
-
-msgid "No"
-msgstr "Non"
-
msgid "Already closed."
msgstr "Déjà fermé."
@@ -1266,21 +1257,30 @@ msgstr ""
msgid "Linked to a different account"
msgstr ""
-msgid "Ready to use"
-msgstr ""
-
msgid "Your primary email address"
msgstr ""
msgid "Linked to your account"
msgstr ""
-msgid "Half-linked to your account"
+msgid "Verification pending"
msgstr ""
+msgid "Unverified"
+msgstr "Non vérifiée"
+
msgid "Apply to accept payments"
msgstr ""
+msgid "Resend verification"
+msgstr ""
+
+msgid "Verify email address"
+msgstr ""
+
+msgid "Dead-end, sorry"
+msgstr ""
+
msgid "Addresses are from {a}{code}maintainers{_code}{_a}."
msgstr ""
@@ -1611,9 +1611,6 @@ msgstr "Identités"
msgid "Verified"
msgstr "Vérifiée"
-msgid "Unverified"
-msgstr "Non vérifiée"
-
msgid "Add Identity"
msgstr "Ajouter une identité"
diff --git a/i18n/core/it.po b/i18n/core/it.po
index 3e133258c5..64f9f9410a 100644
--- a/i18n/core/it.po
+++ b/i18n/core/it.po
@@ -811,23 +811,20 @@ msgstr "Per favore inserisci un indirizzo email valido con meno di 255 caratteri
msgid "You will get a link to an invoice for your payment."
msgstr "Riceverai un link alla fattura del tuo pagamento."
-msgid "Follow-up"
-msgstr "Seguito"
-
-msgid "Quarterly"
-msgstr "Trimestrale"
+msgid "Join Mailing List"
+msgstr ""
-msgid "Yearly"
-msgstr "Annuale"
+msgid "Yes"
+msgstr "Sì"
-msgid "Never"
-msgstr "Mai"
+msgid "No"
+msgstr "No"
msgid "I am surprised that you are seeing this message."
msgstr "Sono sorpreso che tu stia vedendo questo messaggio."
-msgid "You will get a progress report, with a reminder to pay again."
-msgstr "Riceverai un aggiornamento sul progresso, con un promemoria di pagare nuovamente."
+msgid "We send updates related to #BackTheStack."
+msgstr ""
msgid "Promotion"
msgstr "Promozione"
@@ -996,12 +993,6 @@ msgstr "Aggiungi"
msgid "Are you sure?"
msgstr "Sei sicuro?"
-msgid "Yes"
-msgstr "Sì"
-
-msgid "No"
-msgstr "No"
-
msgid "Already closed."
msgstr "Già chiuso."
@@ -1259,21 +1250,30 @@ msgstr "Nessun indirizzo email registrato."
msgid "Linked to a different account"
msgstr "Collegato con un account differente"
-msgid "Ready to use"
-msgstr "Pronto all'uso"
-
msgid "Your primary email address"
msgstr "Il tuo indirizzo email primario"
msgid "Linked to your account"
msgstr "Collegato col tuo account"
-msgid "Half-linked to your account"
-msgstr "Semi-collegato col tuo account"
+msgid "Verification pending"
+msgstr ""
+
+msgid "Unverified"
+msgstr "Non verificato"
msgid "Apply to accept payments"
msgstr "Richiedi di poter accettare pagamenti"
+msgid "Resend verification"
+msgstr ""
+
+msgid "Verify email address"
+msgstr ""
+
+msgid "Dead-end, sorry"
+msgstr ""
+
msgid "Addresses are from {a}{code}maintainers{_code}{_a}."
msgstr "Gli indirizzi sono da {a}{code}maintainers{_code}{_a}."
@@ -1604,9 +1604,6 @@ msgstr "Identità"
msgid "Verified"
msgstr "Verificato"
-msgid "Unverified"
-msgstr "Non verificato"
-
msgid "Add Identity"
msgstr "Aggiungi Identità"
diff --git a/i18n/core/ja.po b/i18n/core/ja.po
index 98f9393daf..e6fd683299 100644
--- a/i18n/core/ja.po
+++ b/i18n/core/ja.po
@@ -803,22 +803,19 @@ msgstr ""
msgid "You will get a link to an invoice for your payment."
msgstr ""
-msgid "Follow-up"
+msgid "Join Mailing List"
msgstr ""
-msgid "Quarterly"
-msgstr ""
-
-msgid "Yearly"
-msgstr ""
+msgid "Yes"
+msgstr "はい"
-msgid "Never"
-msgstr ""
+msgid "No"
+msgstr "いいえ"
msgid "I am surprised that you are seeing this message."
msgstr ""
-msgid "You will get a progress report, with a reminder to pay again."
+msgid "We send updates related to #BackTheStack."
msgstr ""
msgid "Promotion"
@@ -984,12 +981,6 @@ msgstr "追加"
msgid "Are you sure?"
msgstr "よろしいですか?"
-msgid "Yes"
-msgstr "はい"
-
-msgid "No"
-msgstr "いいえ"
-
msgid "Already closed."
msgstr "すでに閉じています。"
@@ -1244,21 +1235,30 @@ msgstr ""
msgid "Linked to a different account"
msgstr ""
-msgid "Ready to use"
-msgstr ""
-
msgid "Your primary email address"
msgstr ""
msgid "Linked to your account"
msgstr ""
-msgid "Half-linked to your account"
+msgid "Verification pending"
msgstr ""
+msgid "Unverified"
+msgstr "未確認"
+
msgid "Apply to accept payments"
msgstr ""
+msgid "Resend verification"
+msgstr ""
+
+msgid "Verify email address"
+msgstr ""
+
+msgid "Dead-end, sorry"
+msgstr ""
+
msgid "Addresses are from {a}{code}maintainers{_code}{_a}."
msgstr ""
@@ -1588,9 +1588,6 @@ msgstr "ID"
msgid "Verified"
msgstr "確認済"
-msgid "Unverified"
-msgstr "未確認"
-
msgid "Add Identity"
msgstr "ID を追加"
diff --git a/i18n/core/nl.po b/i18n/core/nl.po
index 1e80e09725..277f36a0a2 100644
--- a/i18n/core/nl.po
+++ b/i18n/core/nl.po
@@ -813,22 +813,19 @@ msgstr ""
msgid "You will get a link to an invoice for your payment."
msgstr ""
-msgid "Follow-up"
+msgid "Join Mailing List"
msgstr ""
-msgid "Quarterly"
-msgstr ""
-
-msgid "Yearly"
-msgstr ""
+msgid "Yes"
+msgstr "Ja"
-msgid "Never"
-msgstr ""
+msgid "No"
+msgstr "Nee"
msgid "I am surprised that you are seeing this message."
msgstr ""
-msgid "You will get a progress report, with a reminder to pay again."
+msgid "We send updates related to #BackTheStack."
msgstr ""
msgid "Promotion"
@@ -998,12 +995,6 @@ msgstr "Toevoegen"
msgid "Are you sure?"
msgstr ""
-msgid "Yes"
-msgstr "Ja"
-
-msgid "No"
-msgstr "Nee"
-
msgid "Already closed."
msgstr ""
@@ -1261,21 +1252,30 @@ msgstr ""
msgid "Linked to a different account"
msgstr ""
-msgid "Ready to use"
-msgstr ""
-
msgid "Your primary email address"
msgstr ""
msgid "Linked to your account"
msgstr ""
-msgid "Half-linked to your account"
+msgid "Verification pending"
msgstr ""
+msgid "Unverified"
+msgstr "Niet geverifieerd"
+
msgid "Apply to accept payments"
msgstr ""
+msgid "Resend verification"
+msgstr ""
+
+msgid "Verify email address"
+msgstr ""
+
+msgid "Dead-end, sorry"
+msgstr ""
+
msgid "Addresses are from {a}{code}maintainers{_code}{_a}."
msgstr ""
@@ -1606,9 +1606,6 @@ msgstr ""
msgid "Verified"
msgstr ""
-msgid "Unverified"
-msgstr "Niet geverifieerd"
-
msgid "Add Identity"
msgstr ""
From b1257fe6ba320f4e90ebe2e26bb77aefd9034d69 Mon Sep 17 00:00:00 2001
From: Chad Whitacre
Date: Thu, 28 Sep 2017 18:58:04 -0400
Subject: [PATCH 18/31] Bump version to 2119
---
www/version.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/version.txt b/www/version.txt
index 631455b4bd..7b9be0d421 100644
--- a/www/version.txt
+++ b/www/version.txt
@@ -1 +1 @@
-2118
+2119
From 132cd0768c96f596734af06442fec07862813169 Mon Sep 17 00:00:00 2001
From: Chad Whitacre
Date: Thu, 28 Sep 2017 19:00:07 -0400
Subject: [PATCH 19/31] Clear deploy hooks and update schema.sql
---
deploy/before.sql | 5 -----
sql/schema.sql | 4 ++--
2 files changed, 2 insertions(+), 7 deletions(-)
delete mode 100644 deploy/before.sql
diff --git a/deploy/before.sql b/deploy/before.sql
deleted file mode 100644
index bf893f6e08..0000000000
--- a/deploy/before.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-BEGIN;
- ALTER TABLE payments_for_open_source ADD COLUMN on_mailing_list bool NOT NULL DEFAULT TRUE;
- UPDATE payments_for_open_source SET on_mailing_list=false WHERE follow_up = 'never';
- ALTER TABLE payments_for_open_source DROP COLUMN follow_up;
-END;
diff --git a/sql/schema.sql b/sql/schema.sql
index 9aef2c2b48..8fdf303907 100644
--- a/sql/schema.sql
+++ b/sql/schema.sql
@@ -1301,13 +1301,13 @@ CREATE TABLE payments_for_open_source (
braintree_transaction_id text,
braintree_result_message text,
name text NOT NULL,
- follow_up follow_up NOT NULL,
email_address text NOT NULL,
promotion_name text DEFAULT ''::text NOT NULL,
promotion_url text DEFAULT ''::text NOT NULL,
promotion_twitter text DEFAULT ''::text NOT NULL,
promotion_message text DEFAULT ''::text NOT NULL,
- grateful_for text DEFAULT ''::text NOT NULL
+ grateful_for text DEFAULT ''::text NOT NULL,
+ on_mailing_list boolean DEFAULT true NOT NULL
);
From 3447b589ab7f1286e97871fbc108690b6798484a Mon Sep 17 00:00:00 2001
From: Chad Whitacre
Date: Sat, 30 Sep 2017 06:07:34 -0400
Subject: [PATCH 20/31] Invest in open source.
---
tests/ttw/test_homepage.py | 2 +-
www/index.spt | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/ttw/test_homepage.py b/tests/ttw/test_homepage.py
index ee875cd884..d6ce7da0ee 100644
--- a/tests/ttw/test_homepage.py
+++ b/tests/ttw/test_homepage.py
@@ -39,7 +39,7 @@ def fill_form(self, amount, credit_card_number, expiration, cvv,
def test_loads_for_anon(self):
- assert self.css('#banner h1').text == 'Pay for open source.'
+ assert self.css('#banner h1').text == 'Invest in open source.'
assert self.css('#header .sign-in button').html.strip()[:17] == 'Sign in / Sign up'
def test_redirects_for_authed_exclamation_point(self):
diff --git a/www/index.spt b/www/index.spt
index a82e8d4535..96eca600c1 100644
--- a/www/index.spt
+++ b/www/index.spt
@@ -13,7 +13,7 @@ if not user.ANON:
suppress_banner = True
suppress_sidebar = True
page_id = "homepage"
-banner = "Pay for Open Source" # goofy w/ suppress_banner, it's for
+banner = "Invest in Open Source" # goofy w/ suppress_banner, it's for
npayments = website.campaign_npayments
raised = website.campaign_raised
@@ -35,7 +35,7 @@ result
{% block head %}
-
+
@@ -63,7 +63,7 @@ $(document).ready(function() {