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

View File

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

View File

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