Formatting, linting and handling year copyright properly.

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

View File

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

View File

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

View File

@ -24,7 +24,7 @@
<table class="email-footer" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation"> <table class="email-footer" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
<tr> <tr>
<td class="content-cell" align="center"> <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> </td>
</tr> </tr>
</table> </table>

View File

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