Formatting, linting and handling year copyright properly.

This commit is contained in:
mike12345567 2021-04-26 14:24:07 +01:00
parent cba2b9a27d
commit b3933103a8
4 changed files with 8 additions and 2 deletions

View File

@ -84,7 +84,9 @@ class TestConfiguration {
controllers.config.destroy
)
}
} catch (err) {}
} catch (err) {
// don't need to handle error
}
}
async saveSettingsConfig() {

View File

@ -43,6 +43,8 @@ const TemplateBindings = {
REQUEST: "request",
DOCS_URL: "docsUrl",
LOGIN_URL: "loginUrl",
CURRENT_YEAR: "currentYear",
CURRENT_DATE: "currentDate",
}
const TemplateMetadata = {

View File

@ -24,7 +24,7 @@
<table class="email-footer" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td class="content-cell" align="center">
<p class="f-fallback sub align-center">&copy; 2021 {{ company }}. All rights reserved.</p>
<p class="f-fallback sub align-center">&copy; {{ currentYear }} {{ company }}. All rights reserved.</p>
</td>
</tr>
</table>

View File

@ -31,5 +31,7 @@ exports.getSettingsTemplateContext = async () => {
[TemplateBindings.DOCS_URL]:
settings.docsUrl || "https://docs.budibase.com/",
[TemplateBindings.LOGIN_URL]: checkSlashesInUrl(`${URL}/login`),
[TemplateBindings.CURRENT_DATE]: new Date().toISOString(),
[TemplateBindings.CURRENT_YEAR]: new Date().getFullYear(),
}
}