From 78e9152bb7961d515871acf8cf3928ac9f179bbb Mon Sep 17 00:00:00 2001 From: cp6 Date: Tue, 26 Jan 2021 00:44:22 +1100 Subject: [PATCH] Fixed no location or provider causing uneven cards Fixed no location or provider causing uneven cards --- assets/css/style.css | 4 ++++ class.php | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index f0c188b..fef00f6 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1110,6 +1110,10 @@ button.close { visibility: hidden } +.no-loc, .no-prov { + visibility: hidden +} + .form-control:focus { color: #495057; background-color: #fff; diff --git a/class.php b/class.php index 5774c95..6a45a14 100644 --- a/class.php +++ b/class.php @@ -879,10 +879,18 @@ class idlers extends helperFunctions $this->tagOpen('div', 'card-body'); $this->HTMLphrase('h6', 'price', '$' . $data['price'] . ' ' . $data['currency'] . ' ' . $this->paymentTerm($data['term'])); $this->rowColOpen('row text-center', 'col-12'); - $this->HTMLphrase('h6', 'provider', $data['provider']); + if (is_null($data['provider']) || empty($data['provider'])) { + $this->HTMLphrase('h6', 'provider no-prov', ' '); + } else { + $this->HTMLphrase('h6', 'provider', $data['provider']); + } $this->tagClose('div', 2); $this->rowColOpen('row text-center', 'col-12'); - $this->HTMLphrase('h6', 'location', $data['location']); + if (is_null($data['location']) || empty($data['location'])) { + $this->HTMLphrase('h6', 'location no-loc', ' '); + } else { + $this->HTMLphrase('h6', 'location', $data['location']); + } $this->tagClose('div', 2); $this->rowColOpen('row text-center', 'col-12'); $this->HTMLphrase('p', $dd_class, "Due in {$this->processDueDate($data['id'], $data['term'], $data['next_dd'])} days"); @@ -2776,7 +2784,7 @@ class idlers extends helperFunctions $this->tagClose('form'); $this->rowColOpen('row text-center', 'col-12'); $this->outputString('Close YABs'); - $this->tagClose('div',2); + $this->tagClose('div', 2); } }