Skip to content

Commit

Permalink
Fixes #5089 - Admin-UI: custom true/false values when inline editing …
Browse files Browse the repository at this point in the history
…is disabled.
  • Loading branch information
CaMer0n committed Oct 13, 2023
1 parent dd9c011 commit 1a019e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions e107_handlers/form_handler.php
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1a019e6

Please sign in to comment.