mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
updated utils.LoadTemplate() to call template.ParseFiles() directly and added a way to specify a base template (will be used in the next commit)
This commit is contained in:
committed by
Nicola Murino
parent
c07dc74d48
commit
88b10da596
@@ -123,10 +123,10 @@ func loadClientTemplates(templatesPath string) {
|
||||
filepath.Join(templatesPath, templateClientDir, templateClientMessage),
|
||||
}
|
||||
|
||||
filesTmpl := utils.LoadTemplate(template.ParseFiles(filesPaths...))
|
||||
credentialsTmpl := utils.LoadTemplate(template.ParseFiles(credentialsPaths...))
|
||||
loginTmpl := utils.LoadTemplate(template.ParseFiles(loginPath...))
|
||||
messageTmpl := utils.LoadTemplate(template.ParseFiles(messagePath...))
|
||||
filesTmpl := utils.LoadTemplate(nil, filesPaths...)
|
||||
credentialsTmpl := utils.LoadTemplate(nil, credentialsPaths...)
|
||||
loginTmpl := utils.LoadTemplate(nil, loginPath...)
|
||||
messageTmpl := utils.LoadTemplate(nil, messagePath...)
|
||||
|
||||
clientTemplates[templateClientFiles] = filesTmpl
|
||||
clientTemplates[templateClientCredentials] = credentialsTmpl
|
||||
|
||||
Reference in New Issue
Block a user