From 1a019e671d57312abb8477da57ebe2eadf5af8c7 Mon Sep 17 00:00:00 2001 From: camer0n Date: Fri, 13 Oct 2023 10:51:44 -0700 Subject: [PATCH] Fixes #5089 - Admin-UI: custom true/false values when inline editing is disabled. --- e107_handlers/form_handler.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 53b062f433..5ccc439a48 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -6192,6 +6192,8 @@ public function renderValue($field, $value, $attributes, $id = 0) $parms['false'] = $parms['disabled']; } + $true = isset($parms['true']) ? $parms['true'] : defset('ADMIN_TRUE_ICON'); + if(!vartrue($attributes['noedit']) && vartrue($parms['editable']) && !vartrue($parms['link'])) // avoid bad markup, better solution coming up { if(isset($parms['false'])) // custom representation for 'false'. (supports font-awesome when set by css) @@ -6227,11 +6229,11 @@ public function renderValue($field, $value, $attributes, $id = 0) if(!empty($parms['reverse'])) { - $value = ($value) ? $false : defset('ADMIN_TRUE_ICON'); + $value = ($value) ? $false : $true; } else { - $value = $value ? defset('ADMIN_TRUE_ICON') : $false; + $value = $value ? $true : $false; } break;