Skip to content

Commit

Permalink
issue: BooleanField Inline Edit Value
Browse files Browse the repository at this point in the history
This addresses an issue where after setting a checkbox value via Inline Edit
it shows the value as `0` or `1` instead of `Yes` or `No`. You have to
refresh the page in order for the value to appear correctly. This is due to
the raw value being returned instead of it's string equivalent. This adds a
case in `TicketsAjaxAPI::editField()` for `BooleanField` that converts the
raw value to the string value with `toString()`.
  • Loading branch information
JediKev committed Mar 2, 2020
1 parent 1556242 commit 23a463c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/ajax.tickets.php
Expand Up @@ -641,6 +641,9 @@ function editField($tid, $fid) {
if (strlen($clean) > 200)
$clean = Format::truncate($clean, 200);
break;
case $field instanceof BooleanField:
$clean = $field->toString($field->getClean());
break;
default:
$clean = $field->getClean();
$clean = is_array($clean) ? implode($clean, ',') :
Expand Down

0 comments on commit 23a463c

Please sign in to comment.