Remove defaults for Greeting/Signature

This commit is contained in:
Tyler 2018-09-10 23:21:36 -04:00
parent ab1a08cd57
commit f188c9883b
3 changed files with 13 additions and 4 deletions

View File

@ -387,11 +387,13 @@ func (dt *Default) HTMLTemplate() string {
{{ end }}
{{ end }}
{{ if .Email.Body.Signature }}
<p>
{{.Email.Body.Signature}},
<br />
{{.Hermes.Product.Name}}
</p>
{{ end }}
{{ if (eq .Email.Body.FreeMarkdown "") }}
{{ with .Email.Body.Actions }}
@ -488,7 +490,10 @@ func (dt *Default) PlainTextTemplate() string {
<p>{{ $line }}<p>
{{ end }}
{{ end }}
<p>{{.Email.Body.Signature}},<br>{{.Hermes.Product.Name}} - {{.Hermes.Product.Link}}</p>
{{if .Email.Body.Signature }}
<p>{{.Email.Body.Signature}},<br>{{.Hermes.Product.Name}} - {{.Hermes.Product.Link}}</p>
{{ end }}
<p>{{.Hermes.Product.Copyright}}</p>
`

View File

@ -387,11 +387,13 @@ func (dt *Flat) HTMLTemplate() string {
{{ end }}
{{ end }}
{{ if .Email.Body.Signature }}
<p>
{{.Email.Body.Signature}},
<br />
{{.Hermes.Product.Name}}
</p>
{{ end }}
{{ if (eq .Email.Body.FreeMarkdown "") }}
{{ with .Email.Body.Actions }}
@ -488,7 +490,9 @@ func (dt *Flat) PlainTextTemplate() string {
<p>{{ $line }}<p>
{{ end }}
{{ end }}
<p>{{.Email.Body.Signature}},<br>{{.Hermes.Product.Name}} - {{.Hermes.Product.Link}}</p>
{{if .Email.Body.Signature }}
<p>{{.Email.Body.Signature}},<br>{{.Hermes.Product.Name}} - {{.Hermes.Product.Link}}</p>
{{ end }}
<p>{{.Hermes.Product.Copyright}}</p>
`

View File

@ -124,8 +124,8 @@ func setDefaultEmailValues(e *Email) error {
Intros: []string{},
Dictionary: []Entry{},
Outros: []string{},
Signature: "Yours truly",
Greeting: "Hi",
Signature: "",
Greeting: "",
},
}
// Merge the given email with default one