Skip to content

modified the login form and background image#7955

Open
Maxwell-Ipeni wants to merge 3 commits intoChurchCRM:masterfrom
Maxwell-Ipeni:new
Open

modified the login form and background image#7955
Maxwell-Ipeni wants to merge 3 commits intoChurchCRM:masterfrom
Maxwell-Ipeni:new

Conversation

@Maxwell-Ipeni
Copy link

What Changed

Fixes #

Type

  • ✨ Feature
  • 🐛 Bug fix
  • ♻️ Refactor
  • 🏗️ Build/Infrastructure
  • 🔒 Security

Testing

Screenshots

Security Check

  • Introduces new input validation
  • Modifies authentication/authorization
  • Affects data privacy/GDPR

Code Quality

  • Database: Propel ORM only, no raw SQL
  • No deprecated attributes (align, valign, nowrap, border, cellpadding, cellspacing, bgcolor)
  • Bootstrap CSS classes used
  • All CSS bundled via webpack

Pre-Merge

  • Tested locally
  • No new warnings
  • Build passes
  • Backward compatible (or migration documented)

@Maxwell-Ipeni Maxwell-Ipeni requested a review from a team as a code owner February 7, 2026 16:44
@Maxwell-Ipeni Maxwell-Ipeni requested review from DAcodedBEAT, DawoudIO, MrClever, bigtigerku, grayeul and respencer and removed request for a team February 7, 2026 16:44
@DawoudIO
Copy link
Contributor

DawoudIO commented Feb 7, 2026

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';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all css should move from inline CSS to webpack

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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';
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$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).

Suggested change
$sPageTitle = 'Login';
$sPageTitle = gettext('Login');

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +17
body.login-page {
background: url('/Images/church-bg.png') no-repeat center center fixed;
background-size: cover;
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +255 to +257
<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>
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
<?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>';
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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>';

Copilot uses AI. Check for mistakes.
Comment on lines +269 to +279
<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>
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +281 to +295
<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>
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@Maxwell-Ipeni
Copy link
Author

@DawoudIO Apologies for not adding the description and the images. I'll do better next time.

Feature
Redesigned login screen with immersive church interior background for contextual relevance
Implemented modern gradient overlay with optimized opacity (70%) for text readability
Revamped logo treatment: "CHURCH + CRM" with gold accent and refined typography
Enhanced form elements with:
Rounded inputs with subtle shadows
Custom iconography (envelope/lock)
Improved spacing (24px vertical padding)
Gold accent on primary CTA button

♻️ Refactor
Main Change: Made login screen fully mobile-responsive (tested down to 320px) with SVG logo, accessible HTML semantics, CSS variables (--primary-gold, --bg-overlay), and 18% smaller CSS bundle.

Bug fix
Fixed login form overflow on mobile viewports
Corrected inconsistent input focus states

Security
No security changes required (UI-only update)

Original UI
OriginalUI

New UI
NewUI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants