Merge pull request #23733 from overleaf/msm-configurable-login-title

[web] Add `OVERLEAF_LOGIN_SUPPORT_TITLE` for CE/SP

GitOrigin-RevId: 5a50d17ded67b68c72dbaeab5172fc283b5aaa01
This commit is contained in:
Miguel Serrano
2025-02-20 15:50:37 +01:00
committed by Copybot
parent 78297efeab
commit d22ffb926d
3 changed files with 9 additions and 2 deletions

View File

@@ -335,6 +335,10 @@ if (process.env.OVERLEAF_LOGIN_SUPPORT_TEXT != null) {
settings.nav.login_support_text = process.env.OVERLEAF_LOGIN_SUPPORT_TEXT settings.nav.login_support_text = process.env.OVERLEAF_LOGIN_SUPPORT_TEXT
} }
if (process.env.OVERLEAF_LOGIN_SUPPORT_TITLE != null) {
settings.nav.login_support_title = process.env.OVERLEAF_LOGIN_SUPPORT_TITLE
}
// Sending Email // Sending Email
// ------------- // -------------
// //

View File

@@ -241,7 +241,7 @@ const UserPagesController = {
AuthenticationController.setRedirectInSession(req, req.query.redir) AuthenticationController.setRedirectInSession(req, req.query.redir)
} }
res.render('user/login', { res.render('user/login', {
title: 'login', title: Settings.nav?.login_support_title || 'login',
login_support_text: Settings.nav?.login_support_text, login_support_text: Settings.nav?.login_support_text,
}) })
}, },

View File

@@ -7,7 +7,10 @@ block content
.col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4 .col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4
.card .card
.page-header .page-header
h1 #{translate("log_in")} if title
h1 !{title}
else
h1 #{translate("log_in")}
form(data-ol-async-form, name="loginForm", action='/login', method="POST") form(data-ol-async-form, name="loginForm", action='/login', method="POST")
input(name='_csrf', type='hidden', value=csrfToken) input(name='_csrf', type='hidden', value=csrfToken)
+formMessages() +formMessages()