From 3496ddb6ad0844e90a3133c51b5831e4b26c97b3 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Mon, 13 Mar 2023 20:15:47 -0600 Subject: [PATCH] Don't require both father and mother name --- pages/editpayment.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pages/editpayment.php b/pages/editpayment.php index 21f6b38..ae695a1 100644 --- a/pages/editpayment.php +++ b/pages/editpayment.php @@ -59,7 +59,13 @@ if (!empty($_GET['id']) && $database->has('payments', ['paymentid' => $_GET['id' "" => $Strings->get("Choose...", false) ]; foreach ($families as $f) { - $familylist[$f['id']] = "$f[name], $f[father_name] and $f[mother_name]"; + if (!empty($f["father_name"]) && !empty($f["mother_name"])) { + $familylist[$f['id']] = "$f[name], $f[father_name] and $f[mother_name]"; + } else if (!empty($f["father_name"])) { + $familylist[$f['id']] = "$f[name], $f[father_name]"; + } else if (!empty($f["mother_name"])) { + $familylist[$f['id']] = "$f[name], $f[mother_name]"; + } } $textboxes = [ [