Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BACK-3183] Add templates for connecting twiist accounts #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions templates/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ func Test_Load_ExpectedTemplates(t *testing.T) {
"request_dexcom_connect": {},
"request_dexcom_reconnect": {},
"request_dexcom_connect_custodial": {},
"request_twiist_connect": {},
"request_twiist_reconnect": {},
"request_twiist_connect_custodial": {},
"clinic_merged_patient_notification": {},
"clinic_merged_source_clinician_notification": {},
"clinic_merged_target_admin_notification": {},
Expand Down
157 changes: 157 additions & 0 deletions templates/sources/request_twiist_connect_body.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--[if !mso]><!-->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!--<![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<!--[if (gte mso 9)|(IE)]>
<style type="text/css">
table {border-collapse: collapse;}
</style>
<![endif]-->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./css/styles.css" />
</head>
<body>
<center class="wrapper">
<div class="webkit">
<!--[if (gte mso 9)|(IE)]>
<table bgcolor="#F5F5F5" width="560" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td>
<![endif]-->
<table class="outer" align="center">
<tr>
<td class="one-column">
<table width="100%">
<tr>
<td class="inner centered">
<p class="h1 content-width">
Hi, {{ .PatientName }}!
</p>
<p class="h2 content-width">
{{ .ClinicName }} has requested that you begin sharing your Twiist data with Tidepool. Please provide authorization to securely share your Twiist data so that your clinician can view your data in Tidepool by clicking the "Connect your Twiist Account" button below.
</p>
</td>
</tr>
<tr>
<td class="inner centered">
<!--[if (gte mso 9)|(IE)]>
<table bgcolor="#627CFF">
<tr>
<td>
<![endif]-->
<a class="btn primary" href="{{ .WebURL }}/v1/oauth/twiist/authorize?restricted_token={{ .RestrictedTokenId }}">
Connect your Twiist Account
</a>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
<tr>
<td class="inner centered">
<p class="h2 content-width">
Should you ever change your mind, you can revoke data sharing permissions from your Twiist account.
</p>
<p class="h2 content-width">
If you have any questions about this request, or Tidepool, please contact <a href="mailto:[email protected]">[email protected]</a>.
</p>
</td>
</tr>
<tr>
<td class="inner centered">
<p>Sincerely,<br />The Tidepool Team</p>
</td>
</tr>
<tr>
<td class="inner centered">
<a href="{{ .WebURL }}"><img class="logo" width="220" height="24" src="{{ .AssetURL }}/img/tidepool_logo_light_x2.png" alt="Tidepool logo" /></a>
</td>
</tr>
<tr>
<td class="inner centered">
<table class="links primary" align="center">
<tr>
<td class="no-left-padding" valign="middle">
<a href="https://www.twitter.com/Tidepool_org">
<img width="32" height="24" src="{{ .AssetURL }}/img/twitter_white_x2.png" alt="Twitter logo" />
</a>
</td>
<td valign="middle">
<a href="http://www.facebook.com/TidepoolOrg">
<img width="14" height="24" src="{{ .AssetURL }}/img/facebook_white_x2.png" alt="Facebook logo" />
</a>
</td>
<td class="no-right-padding" valign="middle">
<p class="attribution">Made possible by</p>
</td>
<td class="no-right-padding" valign="middle">
<a href="http://www.jdrf.org/">
<img width="94" height="24" src="{{ .AssetURL }}/img/jdrf_logo_reverse_x2.png" alt="JDRF logo" />
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="inner centered">
<p class="about content-width narrow">
<a href="https://www.tidepool.org">Tidepool</a>
An open source, not-for-profit effort to build an open data platform and better applications that reduce the burden of diabetes.
</p>
</td>
</tr>
<tr>
<td class="inner centered">
<table class="links secondary" align="center">
<tr>
<td height="24" class="no-left-padding" valign="top">
<!--[if (gte mso 9)|(IE)]>
<table bgcolor="#FFFFFF">
<tr>
<td>
<![endif]-->
<a class="btn secondary small" href="http://support.tidepool.org">
Get Support
</a>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
<td valign="top">
<a href="https://itunes.apple.com/us/app/blip-notes/id1026395200?mt=8">
<img width="81" height="24" src="{{ .AssetURL }}/img/app_store_badge_x2.png" alt="App Store badge" />
</a>
</td>
<td class="no-right-padding" valign="top">
<a href="https://play.google.com/store/apps/details?id=io.tidepool.urchin&hl=en">
<img width="72" height="24" src="{{ .AssetURL }}/img/google_play_badge_x2.png" alt="Google Play badge" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</div>
</center>
</body>
</html>
160 changes: 160 additions & 0 deletions templates/sources/request_twiist_connect_custodial_body.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--[if !mso]><!-->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!--<![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<!--[if (gte mso 9)|(IE)]>
<style type="text/css">
table {border-collapse: collapse;}
</style>
<![endif]-->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./css/styles.css" />
</head>
<body>
<center class="wrapper">
<div class="webkit">
<!--[if (gte mso 9)|(IE)]>
<table bgcolor="#F5F5F5" width="560" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td>
<![endif]-->
<table class="outer" align="center">
<tr>
<td class="one-column">
<table width="100%">
<tr>
<td class="inner centered">
<p class="h1 content-width">
Hi, {{ .PatientName }}!
</p>
<p class="h2 content-width">
{{ .ClinicName }} has created a Tidepool account for your diabetes device data.
</p>
<p class="h2 content-width">
Along with your new account, they have requested that you begin sharing your Twiist data with Tidepool. Please provide authorization to securely share your Twiist data so that your clinician can view your data in Tidepool by clicking the "Connect your Twiist Account" button below.
</p>
</td>
</tr>
<tr>
<td class="inner centered">
<!--[if (gte mso 9)|(IE)]>
<table bgcolor="#627CFF">
<tr>
<td>
<![endif]-->
<a class="btn primary" href="{{ .WebURL }}/v1/oauth/twiist/authorize?restricted_token={{ .RestrictedTokenId }}">
Connect your Twiist Account
</a>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
<tr>
<td class="inner centered">
<p class="h2 content-width">
Should you ever change your mind, you can revoke data sharing permissions from your Twiist account.
</p>
<p class="h2 content-width">
If you have any questions about this request, or Tidepool, please contact <a href="mailto:[email protected]">[email protected]</a>.
</p>
</td>
</tr>
<tr>
<td class="inner centered">
<p>Sincerely,<br />The Tidepool Team</p>
</td>
</tr>
<tr>
<td class="inner centered">
<a href="{{ .WebURL }}"><img class="logo" width="220" height="24" src="{{ .AssetURL }}/img/tidepool_logo_light_x2.png" alt="Tidepool logo" /></a>
</td>
</tr>
<tr>
<td class="inner centered">
<table class="links primary" align="center">
<tr>
<td class="no-left-padding" valign="middle">
<a href="https://www.twitter.com/Tidepool_org">
<img width="32" height="24" src="{{ .AssetURL }}/img/twitter_white_x2.png" alt="Twitter logo" />
</a>
</td>
<td valign="middle">
<a href="http://www.facebook.com/TidepoolOrg">
<img width="14" height="24" src="{{ .AssetURL }}/img/facebook_white_x2.png" alt="Facebook logo" />
</a>
</td>
<td class="no-right-padding" valign="middle">
<p class="attribution">Made possible by</p>
</td>
<td class="no-right-padding" valign="middle">
<a href="http://www.jdrf.org/">
<img width="94" height="24" src="{{ .AssetURL }}/img/jdrf_logo_reverse_x2.png" alt="JDRF logo" />
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="inner centered">
<p class="about content-width narrow">
<a href="https://www.tidepool.org">Tidepool</a>
An open source, not-for-profit effort to build an open data platform and better applications that reduce the burden of diabetes.
</p>
</td>
</tr>
<tr>
<td class="inner centered">
<table class="links secondary" align="center">
<tr>
<td height="24" class="no-left-padding" valign="top">
<!--[if (gte mso 9)|(IE)]>
<table bgcolor="#FFFFFF">
<tr>
<td>
<![endif]-->
<a class="btn secondary small" href="http://support.tidepool.org">
Get Support
</a>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
<td valign="top">
<a href="https://itunes.apple.com/us/app/blip-notes/id1026395200?mt=8">
<img width="81" height="24" src="{{ .AssetURL }}/img/app_store_badge_x2.png" alt="App Store badge" />
</a>
</td>
<td class="no-right-padding" valign="top">
<a href="https://play.google.com/store/apps/details?id=io.tidepool.urchin&hl=en">
<img width="72" height="24" src="{{ .AssetURL }}/img/google_play_badge_x2.png" alt="Google Play badge" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</div>
</center>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ .ClinicName }} Follow Up - Connect your Twiist Account to Tidepool
1 change: 1 addition & 0 deletions templates/sources/request_twiist_connect_subject.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ .ClinicName }} Follow Up - Connect your Twiist Account to Tidepool
Loading