From ac38aadc12b9665b612196d4293495d79e3f9d19 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 16 Sep 2015 12:36:35 -0700 Subject: Fixing broken email templates --- api/api.go | 3 ++- api/templates/email_change_body.html | 4 ++-- api/templates/find_teams_body.html | 4 ++-- api/templates/invite_body.html | 4 ++-- api/templates/password_change_body.html | 4 ++-- api/templates/post_body.html | 4 ++-- api/templates/reset_body.html | 4 ++-- api/templates/signup_team_body.html | 4 ++-- api/templates/verify_body.html | 4 ++-- api/templates/welcome_body.html | 4 ++-- utils/config.go | 2 ++ 11 files changed, 22 insertions(+), 19 deletions(-) diff --git a/api/api.go b/api/api.go index 8203b07a6..3fbb7d0df 100644 --- a/api/api.go +++ b/api/api.go @@ -17,9 +17,10 @@ var ServerTemplates *template.Template type ServerTemplatePage Page func NewServerTemplatePage(templateName string) *ServerTemplatePage { + return &ServerTemplatePage{ TemplateName: templateName, - Props: make(map[string]string), + Props: props := make(map[string]string), ClientProps: utils.ClientProperties, } } diff --git a/api/templates/email_change_body.html b/api/templates/email_change_body.html index 3f041d09d..0ec4ace2a 100644 --- a/api/templates/email_change_body.html +++ b/api/templates/email_change_body.html @@ -23,7 +23,7 @@ - Any questions at all, mail us any time: {{.FeedbackEmail}}.
+ Any questions at all, mail us any time: {{.ClientProps.FeedbackEmail}}.
Best wishes,
The {{.ClientProps.SiteName}} Team
@@ -38,7 +38,7 @@

(c) 2015 SpinPunch, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.
- If you no longer wish to receive these emails, click on the following link: Unsubscribe + If you no longer wish to receive these emails, click on the following link: Unsubscribe

diff --git a/api/templates/find_teams_body.html b/api/templates/find_teams_body.html index fe134811a..9d34b7a23 100644 --- a/api/templates/find_teams_body.html +++ b/api/templates/find_teams_body.html @@ -31,7 +31,7 @@ - Any questions at all, mail us any time: {{.FeedbackEmail}}.
+ Any questions at all, mail us any time: {{.ClientProps.FeedbackEmail}}.
Best wishes,
The {{.ClientProps.SiteName}} Team
@@ -46,7 +46,7 @@

(c) 2015 SpinPunch, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.
- If you no longer wish to receive these emails, click on the following link: Unsubscribe + If you no longer wish to receive these emails, click on the following link: Unsubscribe

diff --git a/api/templates/invite_body.html b/api/templates/invite_body.html index 401111b75..9e1ce33b2 100644 --- a/api/templates/invite_body.html +++ b/api/templates/invite_body.html @@ -26,7 +26,7 @@ - Any questions at all, mail us any time: {{.FeedbackEmail}}.
+ Any questions at all, mail us any time: {{.ClientProps.FeedbackEmail}}.
Best wishes,
The {{.ClientProps.SiteName}} Team
@@ -41,7 +41,7 @@

(c) 2015 SpinPunch, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.
- If you no longer wish to receive these emails, click on the following link: Unsubscribe + If you no longer wish to receive these emails, click on the following link: Unsubscribe

diff --git a/api/templates/password_change_body.html b/api/templates/password_change_body.html index 6a32e89db..3fef3a5c8 100644 --- a/api/templates/password_change_body.html +++ b/api/templates/password_change_body.html @@ -23,7 +23,7 @@ - Any questions at all, mail us any time: {{.FeedbackEmail}}.
+ Any questions at all, mail us any time: {{.ClientProps.FeedbackEmail}}.
Best wishes,
The {{.ClientProps.SiteName}} Team
@@ -38,7 +38,7 @@

(c) 2015 SpinPunch, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.
- If you no longer wish to receive these emails, click on the following link: Unsubscribe + If you no longer wish to receive these emails, click on the following link: Unsubscribe

diff --git a/api/templates/post_body.html b/api/templates/post_body.html index 0c906807a..a6b81e2f6 100644 --- a/api/templates/post_body.html +++ b/api/templates/post_body.html @@ -26,7 +26,7 @@ - Any questions at all, mail us any time: {{.FeedbackEmail}}.
+ Any questions at all, mail us any time: {{.ClientProps.FeedbackEmail}}.
Best wishes,
The {{.ClientProps.SiteName}} Team
@@ -41,7 +41,7 @@

(c) 2015 SpinPunch, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.
- If you no longer wish to receive these emails, click on the following link: Unsubscribe + If you no longer wish to receive these emails, click on the following link: Unsubscribe

diff --git a/api/templates/reset_body.html b/api/templates/reset_body.html index 3e4938a09..dc6152627 100644 --- a/api/templates/reset_body.html +++ b/api/templates/reset_body.html @@ -26,7 +26,7 @@ - Any questions at all, mail us any time: {{.FeedbackEmail}}.
+ Any questions at all, mail us any time: {{.ClientProps.FeedbackEmail}}.
Best wishes,
The {{.ClientProps.SiteName}} Team
@@ -41,7 +41,7 @@

(c) 2015 SpinPunch, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.
- If you no longer wish to receive these emails, click on the following link: Unsubscribe + If you no longer wish to receive these emails, click on the following link: Unsubscribe

diff --git a/api/templates/signup_team_body.html b/api/templates/signup_team_body.html index ef58aa92c..f5c0e62b0 100644 --- a/api/templates/signup_team_body.html +++ b/api/templates/signup_team_body.html @@ -29,7 +29,7 @@ - Any questions at all, mail us any time: {{.FeedbackEmail}}.
+ Any questions at all, mail us any time: {{.ClientProps.FeedbackEmail}}.
Best wishes,
The {{.ClientProps.SiteName}} Team
@@ -44,7 +44,7 @@

(c) 2015 SpinPunch, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.
- If you no longer wish to receive these emails, click on the following link: Unsubscribe + If you no longer wish to receive these emails, click on the following link: Unsubscribe

diff --git a/api/templates/verify_body.html b/api/templates/verify_body.html index ac60e4fad..8187c8908 100644 --- a/api/templates/verify_body.html +++ b/api/templates/verify_body.html @@ -26,7 +26,7 @@ - Any questions at all, mail us any time: {{.FeedbackEmail}}.
+ Any questions at all, mail us any time: {{.ClientProps.FeedbackEmail}}.
Best wishes,
The {{.ClientProps.SiteName}} Team
@@ -41,7 +41,7 @@

(c) 2015 SpinPunch, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.
- If you no longer wish to receive these emails, click on the following link: Unsubscribe + If you no longer wish to receive these emails, click on the following link: Unsubscribe

diff --git a/api/templates/welcome_body.html b/api/templates/welcome_body.html index 4d4f03a2d..c75e14c6a 100644 --- a/api/templates/welcome_body.html +++ b/api/templates/welcome_body.html @@ -23,7 +23,7 @@ - Any questions at all, mail us any time: {{.FeedbackEmail}}.
+ Any questions at all, mail us any time: {{.ClientProps.FeedbackEmail}}.
Best wishes,
The {{.ClientProps.SiteName}} Team
@@ -38,7 +38,7 @@

(c) 2015 SpinPunch, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.
- If you no longer wish to receive these emails, click on the following link: Unsubscribe + If you no longer wish to receive these emails, click on the following link: Unsubscribe

diff --git a/utils/config.go b/utils/config.go index 9f66e9f37..722964934 100644 --- a/utils/config.go +++ b/utils/config.go @@ -277,11 +277,13 @@ func getClientProperties(c *Config) map[string]string { props["Version"] = c.ServiceSettings.Version props["SiteName"] = c.ServiceSettings.SiteName props["ByPassEmail"] = strconv.FormatBool(c.EmailSettings.ByPassEmail) + props["FeedbackEmail"] = c.EmailSettings.FeedbackEmail props["ShowEmailAddress"] = strconv.FormatBool(c.PrivacySettings.ShowEmailAddress) props["AllowPublicLink"] = strconv.FormatBool(c.TeamSettings.AllowPublicLink) props["SegmentDeveloperKey"] = c.ClientSettings.SegmentDeveloperKey props["GoogleDeveloperKey"] = c.ClientSettings.GoogleDeveloperKey props["AnalyticsUrl"] = c.ServiceSettings.AnalyticsUrl + props["ByPassEmail"] = strconv.FormatBool(c.EmailSettings.ByPassEmail) props["ProfileHeight"] = fmt.Sprintf("%v", c.ImageSettings.ProfileHeight) props["ProfileWidth"] = fmt.Sprintf("%v", c.ImageSettings.ProfileWidth) -- cgit v1.2.3-1-g7c22 From c7bb4ab7f8cf39cf761694133d259120dfd7129a Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 16 Sep 2015 12:37:54 -0700 Subject: Fixing broken email templates --- api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index 3fbb7d0df..a5e15b5b0 100644 --- a/api/api.go +++ b/api/api.go @@ -20,7 +20,7 @@ func NewServerTemplatePage(templateName string) *ServerTemplatePage { return &ServerTemplatePage{ TemplateName: templateName, - Props: props := make(map[string]string), + Props: make(map[string]string), ClientProps: utils.ClientProperties, } } -- cgit v1.2.3-1-g7c22 From 609e5c6652f5116e99a733d7e76828024f43bac4 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 16 Sep 2015 12:38:09 -0700 Subject: Fixing broken email templates --- api/api.go | 1 - 1 file changed, 1 deletion(-) diff --git a/api/api.go b/api/api.go index a5e15b5b0..8203b07a6 100644 --- a/api/api.go +++ b/api/api.go @@ -17,7 +17,6 @@ var ServerTemplates *template.Template type ServerTemplatePage Page func NewServerTemplatePage(templateName string) *ServerTemplatePage { - return &ServerTemplatePage{ TemplateName: templateName, Props: make(map[string]string), -- cgit v1.2.3-1-g7c22 From c60e687c6bac4acdbaa15281de1f7ab6750120a4 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 16 Sep 2015 12:38:51 -0700 Subject: Fixing broken email templates --- utils/config.go | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/config.go b/utils/config.go index 722964934..70078cb9a 100644 --- a/utils/config.go +++ b/utils/config.go @@ -283,7 +283,6 @@ func getClientProperties(c *Config) map[string]string { props["SegmentDeveloperKey"] = c.ClientSettings.SegmentDeveloperKey props["GoogleDeveloperKey"] = c.ClientSettings.GoogleDeveloperKey props["AnalyticsUrl"] = c.ServiceSettings.AnalyticsUrl - props["ByPassEmail"] = strconv.FormatBool(c.EmailSettings.ByPassEmail) props["ProfileHeight"] = fmt.Sprintf("%v", c.ImageSettings.ProfileHeight) props["ProfileWidth"] = fmt.Sprintf("%v", c.ImageSettings.ProfileWidth) -- cgit v1.2.3-1-g7c22