fix: email template (#1830)

* fix: email template

* fix: email template
This commit is contained in:
Livio Amstutz
2021-06-08 15:12:52 +02:00
committed by GitHub
parent 81974b977d
commit 255139862d
3 changed files with 5 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@@ -142,7 +142,7 @@
<tbody> <tbody>
<tr> <tr>
<td style="vertical-align:top;padding:0;"> <td style="vertical-align:top;padding:0;">
{{if .LogoURL}}
<table <table
border="0" cellpadding="0" cellspacing="0" role="presentation" style="" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="" width="100%"
> >
@@ -174,7 +174,7 @@
</tbody> </tbody>
</table> </table>
{{end}}
</td> </td>
</tr> </tr>
</tbody> </tbody>

View File

@@ -33,7 +33,6 @@ type TemplateData struct {
PrimaryColor string PrimaryColor string
BackgroundColor string BackgroundColor string
FontColor string FontColor string
IncludeLogo bool
LogoURL string LogoURL string
FontURL string FontURL string
FontFamily string FontFamily string
@@ -83,10 +82,8 @@ func GetTemplateData(apiDomain, href string, text *iam_model.MailTextView, polic
if apiDomain == "" { if apiDomain == "" {
return templateData return templateData
} }
if policy.LogoURL == "" { templateData.LogoURL = ""
templateData.IncludeLogo = false if policy.LogoURL != "" {
} else {
templateData.IncludeLogo = true
templateData.LogoURL = fmt.Sprintf("%s/assets/v1/%s/%s", apiDomain, policy.AggregateID, policy.LogoURL) templateData.LogoURL = fmt.Sprintf("%s/assets/v1/%s/%s", apiDomain, policy.AggregateID, policy.LogoURL)
} }
if policy.FontURL != "" { if policy.FontURL != "" {