modified the login form and background image#7955
modified the login form and background image#7955Maxwell-Ipeni wants to merge 3 commits intoChurchCRM:masterfrom
Conversation
|
Thanks @Maxwell-Ipeni for the PR, can you please fill in the desc, please include before and after images etc |
| use ChurchCRM\dto\SystemURLs; | ||
|
|
||
| $sPageTitle = gettext('Login'); | ||
| $sPageTitle = 'Login'; |
There was a problem hiding this comment.
we need this for localization
| <style> | ||
| @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital@0;1&family=Inter:wght@400;500;600;700&display=swap'); | ||
|
|
||
| body.login-page { |
There was a problem hiding this comment.
all css should move from inline CSS to webpack
There was a problem hiding this comment.
Pull request overview
Updates the unauthenticated session “begin session” (login) template to use a new visual design and adds a new background image asset for the login page.
Changes:
- Replaces the existing login page markup with a new custom-styled layout (inline CSS + updated structure).
- Adds a new login background image (
church-bg.png) referenced by the template.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/session/templates/begin-session.php | Reworks login UI, styling, and displayed links/messages. |
| src/Images/church-bg.png | Adds new background image used by the login page. |
| use ChurchCRM\dto\SystemURLs; | ||
|
|
||
| $sPageTitle = gettext('Login'); | ||
| $sPageTitle = 'Login'; |
There was a problem hiding this comment.
$sPageTitle was changed from a translated string to a hard-coded literal. This makes the page title non-localizable; please keep using gettext('Login') (consistent with other session templates).
| $sPageTitle = 'Login'; | |
| $sPageTitle = gettext('Login'); |
| body.login-page { | ||
| background: url('/Images/church-bg.png') no-repeat center center fixed; | ||
| background-size: cover; |
There was a problem hiding this comment.
The CSS background image uses an absolute path (/Images/...) which will break when ChurchCRM is installed in a subdirectory. Use SystemURLs::getRootPath() (or the provided sRootPath) to build the image URL.
| <h1 class="login-title-church">CHURCH <i class="fa-solid fa-cross login-title-icon"></i> <span class="login-title-crm">CRM</span></h1> | ||
| <p class="login-subtitle">Main St. Cathedral</p> | ||
| <p class="login-subtitle-2">Secure Login</p> |
There was a problem hiding this comment.
The login header/subtitle is hard-coded (including a specific church name). This should use ChurchMetaData::getChurchName() and wrap user-facing text in gettext() so it works for different deployments and locales.
| <?php | ||
| if (isset($_GET['Timeout'])) { | ||
| $loginPageMsg = gettext('Your previous session timed out. Please login again.'); | ||
| echo '<div class="login-error">Your previous session timed out. Please login again.</div>'; |
There was a problem hiding this comment.
The timeout message is now hard-coded and no longer localized. Please use gettext() (and keep wording consistent with the previous translated message) so this notice is translatable.
| echo '<div class="login-error">Your previous session timed out. Please login again.</div>'; | |
| echo '<div class="login-error">' . gettext('Your previous session timed out. Please login again.') . '</div>'; |
| <input type="text" id="UserBox" name="User" class="login-input" value="<?= $prefilledUserName ?>" placeholder="Email/Username" required autofocus> | ||
| <span class="input-icon"><i class="fa-solid fa-envelope"></i></span> | ||
| </div> | ||
| <div class="input-group mb-3"> | ||
| <input type="password" id="PasswordBox" name="Password" class="form-control" placeholder="<?= gettext('Password') ?>" required autofocus> | ||
| </div> | ||
| <div class="row"> | ||
| <div class="col-12"> | ||
| <button type="submit" class="btn btn-primary btn-block">Sign In</button> | ||
| </div> | ||
| <!-- /.col --> | ||
| <div class="login-input-group"> | ||
| <input type="password" id="PasswordBox" name="Password" class="login-input" placeholder="Password" required> | ||
| <span class="input-icon"><i class="fa-solid fa-lock"></i></span> | ||
| </div> | ||
| <button type="submit" class="login-btn"> | ||
| <i class="fa-solid fa-cross"></i> | ||
| Sign In | ||
| </button> |
There was a problem hiding this comment.
Several user-facing strings in the form (placeholders, button label) are no longer wrapped in gettext(), so they won’t be translated. Please restore gettext() usage for these strings to match other session templates.
| <div class="login-forgot"> | ||
| <a href="<?= $forgotPasswordURL ?>">I forgot my password</a> | ||
| </div> | ||
|
|
||
| <div class="login-divider"> | ||
| <span>OR</span> | ||
| </div> | ||
|
|
||
| <div class="login-register"> | ||
| <p>New to Main St. Cathedral?</p> | ||
| <a href="<?= SystemURLs::getRootPath() ?>/external/register/" class="login-register-btn"> | ||
| <i class="fa-solid fa-user-check"></i> | ||
| Register a New Family | ||
| </a> | ||
| </div> |
There was a problem hiding this comment.
The Lost Password and Self Registration links are now shown unconditionally. This ignores the existing SystemConfig flags (bEnableLostPassword / bEnableSelfRegistration) and can expose broken links (404 / “not available”). Please gate these sections behind the same config checks as before.
|
@DawoudIO Apologies for not adding the description and the images. I'll do better next time. ✨ Feature ♻️ Refactor Bug fix Security |


What Changed
Fixes #
Type
Testing
Screenshots
Security Check
Code Quality
Pre-Merge