Skip to content

Commit b4d2618

Browse files
Hayredin950claude
andcommitted
fix: 6 UX issues — terms nav, home table, donor nav, eligibility redesign, leaderboard, stories
- terms.php: read ?role= param so back button returns to the correct register form - register.php: pass ?role= to terms link so the round-trip works - index.php: fetch hospital city/state from JOIN; rename "Required By" to "Posted"; show posted date - header.php: remove Find Donors and Emergency SOS from donor nav (not relevant to donors) - eligibility.php: full premium redesign — dark hero, numbered question cards, step progress indicator, green/red result panels, inline guidelines grid; removed emoji checkmark from heading - leaderboard.php: skip empty cached results so list appears on first load without dropdown toggle; change badge column to show total_donations (donor_matches is empty by design) - testimonials.php: fix broken link (submit_story.php → donor/submit_testimonial.php) - donor/submit_testimonial.php: gate on total_donations instead of donor_matches so seeded donors with donation history can submit stories Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c201717 commit b4d2618

8 files changed

Lines changed: 424 additions & 237 deletions

File tree

lifeline/donor/submit_testimonial.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,8 @@
55
$userId = $_SESSION['user_id'];
66
$profile = getDonorProfile($pdo, $userId);
77

8-
// Only donors with at least one completed donation may submit a testimonial.
9-
$stmt = $pdo->prepare("
10-
SELECT COUNT(*) FROM donor_matches
11-
WHERE donor_id = ? AND status = 'donated'
12-
");
13-
$stmt->execute([$userId]);
14-
$donated = (int)$stmt->fetchColumn();
8+
// Donors with at least one recorded donation may submit a testimonial.
9+
$donated = (int)($profile['total_donations'] ?? 0);
1510

1611
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
1712
validateCsrf();

0 commit comments

Comments
 (0)