From 3534ba0b6d15250fcfec693b27324c0b30990222 Mon Sep 17 00:00:00 2001 From: Antti Salmivaara Date: Tue, 23 Oct 2018 13:32:20 +0300 Subject: [PATCH 1/3] Remove plain text email templates --- .../booking-request-accepted-text.txt | 30 ---------------- .../booking-request-auto-declined-text.txt | 12 ------- .../booking-request-declined-text.txt | 12 ------- .../email-changed/email-changed-text.txt | 8 ----- .../money-paid/money-paid-text.txt | 32 ----------------- .../new-booking-request-text.txt | 35 ------------------- .../new-message/new-message-text.txt | 15 -------- .../password-changed-text.txt | 8 ----- .../reset-password/reset-password-text.txt | 12 ------- .../review-by-customer-wanted-text.txt | 9 ----- .../review-by-other-party-published-text.txt | 14 -------- ...review-by-other-party-unpublished-text.txt | 10 ------ .../review-by-provider-wanted-text.txt | 9 ----- .../user-joined/user-joined-text.txt | 6 ---- .../verify-changed-email-address-text.txt | 12 ------- .../verify-email-address-text.txt | 12 ------- 16 files changed, 236 deletions(-) delete mode 100644 ext/default-mail-templates/booking-request-accepted/booking-request-accepted-text.txt delete mode 100644 ext/default-mail-templates/booking-request-auto-declined/booking-request-auto-declined-text.txt delete mode 100644 ext/default-mail-templates/booking-request-declined/booking-request-declined-text.txt delete mode 100644 ext/default-mail-templates/email-changed/email-changed-text.txt delete mode 100644 ext/default-mail-templates/money-paid/money-paid-text.txt delete mode 100644 ext/default-mail-templates/new-booking-request/new-booking-request-text.txt delete mode 100644 ext/default-mail-templates/new-message/new-message-text.txt delete mode 100644 ext/default-mail-templates/password-changed/password-changed-text.txt delete mode 100644 ext/default-mail-templates/reset-password/reset-password-text.txt delete mode 100644 ext/default-mail-templates/review-by-customer-wanted/review-by-customer-wanted-text.txt delete mode 100644 ext/default-mail-templates/review-by-other-party-published/review-by-other-party-published-text.txt delete mode 100644 ext/default-mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-text.txt delete mode 100644 ext/default-mail-templates/review-by-provider-wanted/review-by-provider-wanted-text.txt delete mode 100644 ext/default-mail-templates/user-joined/user-joined-text.txt delete mode 100644 ext/default-mail-templates/verify-changed-email-address/verify-changed-email-address-text.txt delete mode 100644 ext/default-mail-templates/verify-email-address/verify-email-address-text.txt diff --git a/ext/default-mail-templates/booking-request-accepted/booking-request-accepted-text.txt b/ext/default-mail-templates/booking-request-accepted/booking-request-accepted-text.txt deleted file mode 100644 index 0ac5afff..00000000 --- a/ext/default-mail-templates/booking-request-accepted/booking-request-accepted-text.txt +++ /dev/null @@ -1,30 +0,0 @@ - -{{~#*inline "format-money"~}} -{{money-amount money}} {{money.currency}} -{{~/inline~}} - -{{~#*inline "format-date"~}} -{{date date format="MMM d, YYYY"}} -{{~/inline~}} - -Your booking request was accepted! - -{{#with transaction~}} -{{provider.display-name}} has accepted your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}. - -We have charged {{> format-money money=payin-total}} from your credit card. Here's your receipt. - -Payment -{{#each line-items~}} -{{~#contains include-for "customer"~}} -{{~#eq "day" code~}} -{{> format-money money=unit-price}} x {{number quantity}} {{inflect quantity "day" "days"}}: {{> format-money money=line-total}} -{{/eq~}} -{{~#eq "night" code~}} -{{> format-money money=unit-price}} x {{number quantity}} {{inflect quantity "night" "nights"}}: {{> format-money money=line-total}} -{{/eq~}} -{{~/contains~}} -{{/each~}} -Payment total: {{> format-money money=payin-total}} - -{{~/with}} \ No newline at end of file diff --git a/ext/default-mail-templates/booking-request-auto-declined/booking-request-auto-declined-text.txt b/ext/default-mail-templates/booking-request-auto-declined/booking-request-auto-declined-text.txt deleted file mode 100644 index 714ccef9..00000000 --- a/ext/default-mail-templates/booking-request-auto-declined/booking-request-auto-declined-text.txt +++ /dev/null @@ -1,12 +0,0 @@ - -{{~#*inline "format-date"~}} -{{date date format="MMM d, YYYY"}} -{{~/inline~}} - -Your booking request has expired. - -{{#with transaction~}} -Unfortunately {{provider.display-name}} didn't respond to your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}} on time, so the request has expired. You have not been billed. -{{~/with}} - -Try to book something else instead: {{marketplace.url}} \ No newline at end of file diff --git a/ext/default-mail-templates/booking-request-declined/booking-request-declined-text.txt b/ext/default-mail-templates/booking-request-declined/booking-request-declined-text.txt deleted file mode 100644 index 5d006813..00000000 --- a/ext/default-mail-templates/booking-request-declined/booking-request-declined-text.txt +++ /dev/null @@ -1,12 +0,0 @@ - -{{~#*inline "format-date"~}} -{{date date format="MMM d, YYYY"}} -{{~/inline~}} - -Your booking request was declined. - -{{#with transaction~}} -Unfortunately {{provider.display-name}} decided to decline your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}. You have not been billed. -{{~/with}} - -Try to book something else instead: {{marketplace.url}} \ No newline at end of file diff --git a/ext/default-mail-templates/email-changed/email-changed-text.txt b/ext/default-mail-templates/email-changed/email-changed-text.txt deleted file mode 100644 index 4b2fa4e0..00000000 --- a/ext/default-mail-templates/email-changed/email-changed-text.txt +++ /dev/null @@ -1,8 +0,0 @@ -Hello {{recipient.first-name}}, - -Your {{marketplace.name}} account's email address was changed. - -If you didn't make this change, please contact us. - -Best regards, -The {{marketplace.name}} team \ No newline at end of file diff --git a/ext/default-mail-templates/money-paid/money-paid-text.txt b/ext/default-mail-templates/money-paid/money-paid-text.txt deleted file mode 100644 index 3474f345..00000000 --- a/ext/default-mail-templates/money-paid/money-paid-text.txt +++ /dev/null @@ -1,32 +0,0 @@ - -{{~#*inline "format-money"~}} -{{money-amount money}} {{money.currency}} -{{~/inline~}} - -{{~#*inline "format-date"~}} -{{date date format="MMM d, YYYY"}} -{{~/inline~}} - -{{#with transaction~}} -You have been paid {{> format-money money=payout-total}} - -We have sent you {{> format-money money=payout-total}} for the booking of {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}} by {{customer.display-name}}. It might take up to 7 days for the money to reach your bank account. - -Here's the breakdown. - -Payment -{{#each line-items~}} -{{~#contains include-for "provider"~}} -{{~#eq "day" code~}} -{{> format-money money=unit-price}} x {{number quantity}} {{inflect quantity "day" "days"}}: {{> format-money money=line-total}} -{{/eq~}} -{{~#eq "night" code~}} -{{> format-money money=unit-price}} x {{number quantity}} {{inflect quantity "night" "nights"}}: {{> format-money money=line-total}} -{{/eq~}} -{{~#eq "provider-commission" code~}} -{{marketplace.name}} fee: {{> format-money money=line-total}} -{{/eq~}} -{{~/contains~}} -{{/each~}} -You earn: {{> format-money money=payout-total}} -{{~/with}} \ No newline at end of file diff --git a/ext/default-mail-templates/new-booking-request/new-booking-request-text.txt b/ext/default-mail-templates/new-booking-request/new-booking-request-text.txt deleted file mode 100644 index 20c9300f..00000000 --- a/ext/default-mail-templates/new-booking-request/new-booking-request-text.txt +++ /dev/null @@ -1,35 +0,0 @@ - -{{~#*inline "format-money"~}} -{{money-amount money}} {{money.currency}} -{{~/inline~}} - -{{~#*inline "format-date"~}} -{{date date format="MMM d, YYYY"}} -{{~/inline~}} - -{{#with transaction~}} -Please respond to a request by {{customer.display-name}} - -Good news! {{customer.display-name}} just requested to book {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}. Here's the breakdown. - -Payment -{{#each line-items~}} -{{~#contains include-for "provider"~}} -{{~#eq "day" code~}} -{{> format-money money=unit-price}} x {{number quantity}} {{inflect quantity "day" "days"}}: {{> format-money money=line-total}} -{{/eq~}} -{{~#eq "night" code~}} -{{> format-money money=unit-price}} x {{number quantity}} {{inflect quantity "night" "nights"}}: {{> format-money money=line-total}} -{{/eq~}} -{{~#eq "provider-commission" code~}} -{{marketplace.name}} fee: {{> format-money money=line-total}} -{{/eq~}} -{{~/contains~}} -{{/each~}} -You earn: {{> format-money money=payout-total}} - -You need to accept the request by {{> format-date date=delayed-transition.run-at}}. Otherwise the request will be expired and you won't get paid. If the booked dates won't work for you, you can also choose to decline the request. - -Accept or decline the booking: {{marketplace.url}}/sale/{{url-encode id}}/details - -{{~/with}} \ No newline at end of file diff --git a/ext/default-mail-templates/new-message/new-message-text.txt b/ext/default-mail-templates/new-message/new-message-text.txt deleted file mode 100644 index 5bd5b8bb..00000000 --- a/ext/default-mail-templates/new-message/new-message-text.txt +++ /dev/null @@ -1,15 +0,0 @@ -{{#with message~}} - -You have a new message from {{sender.display-name}} - -"{{content}}" - -{{#eq recipient-role "customer"~}} -Reply to {{sender.display-name}}: {{marketplace.url}}/order/{{url-encode transaction.id}}/details -{{/eq~}} - -{{#eq recipient-role "provider"~}} -Reply to {{sender.display-name}}: {{marketplace.url}}/sale/{{url-encode transaction.id}}/details -{{/eq~}} - -{{~/with}} \ No newline at end of file diff --git a/ext/default-mail-templates/password-changed/password-changed-text.txt b/ext/default-mail-templates/password-changed/password-changed-text.txt deleted file mode 100644 index 65e747bf..00000000 --- a/ext/default-mail-templates/password-changed/password-changed-text.txt +++ /dev/null @@ -1,8 +0,0 @@ -Hello {{recipient.first-name}}, - -Your {{marketplace.name}} account's password was changed. - -If you didn't make this change, please contact us. - -Best regards, -The {{marketplace.name}} team \ No newline at end of file diff --git a/ext/default-mail-templates/reset-password/reset-password-text.txt b/ext/default-mail-templates/reset-password/reset-password-text.txt deleted file mode 100644 index 992de7dd..00000000 --- a/ext/default-mail-templates/reset-password/reset-password-text.txt +++ /dev/null @@ -1,12 +0,0 @@ -Hello {{recipient.first-name}}, - -You have indicated that you have forgotten your password for {{marketplace.name}}. Click the following link to reset your password: - -{{marketplace.url}}/reset-password?t={{form-encode password-reset.token}}&e={{form-encode password-reset.email-address}} - -If you don't use this link within 1 hour, it will expire. You can request a new password reset link, if you need to. - -If you didn't request this, please ignore this email. Your password won't be changed until you use the link above to set a new one. - -Best regards, -The {{marketplace.name}} team \ No newline at end of file diff --git a/ext/default-mail-templates/review-by-customer-wanted/review-by-customer-wanted-text.txt b/ext/default-mail-templates/review-by-customer-wanted/review-by-customer-wanted-text.txt deleted file mode 100644 index 5c240e11..00000000 --- a/ext/default-mail-templates/review-by-customer-wanted/review-by-customer-wanted-text.txt +++ /dev/null @@ -1,9 +0,0 @@ - -{{~#with transaction~}} - -How was your experience with {{listing.title}}? Write a review! - -You recently booked {{listing.title}} from {{provider.display-name}}. Please write a review to describe your experience. Reviews are important part of the {{marketplace.name}} community. - -Leave a review: {{marketplace.url}}/order/{{url-encode id}}/details -{{~/with~}} \ No newline at end of file diff --git a/ext/default-mail-templates/review-by-other-party-published/review-by-other-party-published-text.txt b/ext/default-mail-templates/review-by-other-party-published/review-by-other-party-published-text.txt deleted file mode 100644 index 824650c9..00000000 --- a/ext/default-mail-templates/review-by-other-party-published/review-by-other-party-published-text.txt +++ /dev/null @@ -1,14 +0,0 @@ - -{{~#with transaction~}} - -{{other-party.display-name}} wrote you a review. Here's what they wrote. - -{{#each reviews~}} -{{#eq recipient.id subject.id}}"{{content}}"{{/eq}} -{{~/each}} - -The review has been published on your {{marketplace.name}} profile. - -View your profile: {{marketplace.url}}/u/{{url-encode recipient.id}} - -{{~/with~}} \ No newline at end of file diff --git a/ext/default-mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-text.txt b/ext/default-mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-text.txt deleted file mode 100644 index eecbac2f..00000000 --- a/ext/default-mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-text.txt +++ /dev/null @@ -1,10 +0,0 @@ - -{{~#with transaction~}} - -Find out what {{other-party.display-name}} wrote! - -{{other-party.display-name}} has left you a new review. To see what they wrote, please leave them a review to describe your experience. - -Leave a review: {{marketplace.url}}/{{#eq recipient-role "customer"}}order{{else}}sale{{/eq}}/{{url-encode id}}/details - -{{~/with~}} \ No newline at end of file diff --git a/ext/default-mail-templates/review-by-provider-wanted/review-by-provider-wanted-text.txt b/ext/default-mail-templates/review-by-provider-wanted/review-by-provider-wanted-text.txt deleted file mode 100644 index 1789c3bd..00000000 --- a/ext/default-mail-templates/review-by-provider-wanted/review-by-provider-wanted-text.txt +++ /dev/null @@ -1,9 +0,0 @@ - -{{~#with transaction~}} - -How was your experience with {{customer.display-name}}? Write a review! - -{{customer.display-name}} recently booked {{listing.title}} from you. Please write {{customer.display-name}} a review to describe your experience. Reviews are important part of the {{marketplace.name}} community. - -Leave a review: {{marketplace.url}}/sale/{{url-encode id}}/details -{{~/with~}} \ No newline at end of file diff --git a/ext/default-mail-templates/user-joined/user-joined-text.txt b/ext/default-mail-templates/user-joined/user-joined-text.txt deleted file mode 100644 index 660f8868..00000000 --- a/ext/default-mail-templates/user-joined/user-joined-text.txt +++ /dev/null @@ -1,6 +0,0 @@ -Hello {{recipient.first-name}}, - -Welcome to {{marketplace.name}}! - -Best regards, -The {{marketplace.name}} team \ No newline at end of file diff --git a/ext/default-mail-templates/verify-changed-email-address/verify-changed-email-address-text.txt b/ext/default-mail-templates/verify-changed-email-address/verify-changed-email-address-text.txt deleted file mode 100644 index 8d517d15..00000000 --- a/ext/default-mail-templates/verify-changed-email-address/verify-changed-email-address-text.txt +++ /dev/null @@ -1,12 +0,0 @@ -Hello {{recipient.first-name}}, - -To complete your email address change in {{marketplace.name}}, verify your email by clicking the link below: - -{{marketplace.url}}/verify-email?t={{form-encode email-verification.token}} - -Alternatively, you can copy the link to your browser's address bar. - -If you don't use this link within 2 days, it will expire. You can request a new verification link, if you need to. - -Best regards, -The {{marketplace.name}} team \ No newline at end of file diff --git a/ext/default-mail-templates/verify-email-address/verify-email-address-text.txt b/ext/default-mail-templates/verify-email-address/verify-email-address-text.txt deleted file mode 100644 index 0f0b4d87..00000000 --- a/ext/default-mail-templates/verify-email-address/verify-email-address-text.txt +++ /dev/null @@ -1,12 +0,0 @@ -Hello {{recipient.first-name}}, - -To complete your signup to {{marketplace.name}}, verify your email by clicking the link below: - -{{marketplace.url}}/verify-email?t={{form-encode email-verification.token}} - -Alternatively, you can copy the link to your browser's address bar. - -If you don't use this link within 2 days, it will expire. You can request a new verification link, if you need to. - -Best regards, -The {{marketplace.name}} team \ No newline at end of file From 8174efded120064380606742a3f17170eb91ec40 Mon Sep 17 00:00:00 2001 From: Antti Salmivaara Date: Tue, 23 Oct 2018 13:34:03 +0300 Subject: [PATCH 2/3] Remove text only email information from README --- ext/default-mail-templates/README.md | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/ext/default-mail-templates/README.md b/ext/default-mail-templates/README.md index 23fadc82..5908f454 100644 --- a/ext/default-mail-templates/README.md +++ b/ext/default-mail-templates/README.md @@ -9,15 +9,14 @@ automatically. Marketplace owner needs to notify the Sharetribe team. ## Template parts -A template consists of three files: +A template consists of two files: * `TEMPLATE_NAME-subject.txt` - holds the mail Subject line template -* `TEMPLATE_NAME-text.txt` - holds the template for the plain text version of the mail * `TEMPLATE_NAME-html.html` - contains the template for the HTML version of the mail -All the parts are mandatory. All emails that are sent from the marketplace contain both the plain -text and HTML variants and the recipient's mail client is free to choose which one to visualize and -how. +Both parts are mandatory. All emails that are sent from the marketplace contain both the HTML and plain +text variants and the recipient's mail client is free to choose which one to visualize and +how. The text version is automatically generated from the HTML template. ## Template syntax @@ -39,19 +38,6 @@ Example html: ``` -Example text version: - -``` -Hello {{recipient.first-name}}, - -Your {{marketplace.name}} account's email address was changed. - -If you didn't make this change, please contact us. - -Best regards, -The {{marketplace.name}} team -``` - Variables within `{{ }}` are expanded and escaped, so that they are safe to place inside HTML content. As seen above, some variables have nested values, which can be accessed with dot `.` operator. From b43dfc4cc4a1984422f332270f7c664b10784c55 Mon Sep 17 00:00:00 2001 From: Antti Salmivaara Date: Tue, 23 Oct 2018 13:40:56 +0300 Subject: [PATCH 3/3] Update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8eda9bb8..83e3b890 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ way to update this template, but currently, we follow a pattern: --- ## Upcoming version 2018-10-XX + +* [remove] Removed plain text parts of email templates. + [#942](https://github.com/sharetribe/flex-template-web/pull/942) * [add] Add referrer policy due tokens in URL on PasswordResetPage and EmailVerificationPage. [#940](https://github.com/sharetribe/flex-template-web/pull/940) * [add] Added initial documentation about our Redux setup.