-
Problem report
-
Resolution: Unresolved
-
Trivial
-
7.2.11, 7.4.1, 8.0.0alpha1 (master)
-
None
-
Sprint candidates
-
1
I believe the incorrect constants are being used in ui/widgets/views/column.edit.php. The following is specified:
// Display value as.$form_grid->addItem([ new CLabel(_('Display value as'), 'display_value_as'), new CFormField( (new CRadioButtonList('display_value_as', (int) $data['display_value_as'])) ->addValue(_('Numeric'), CWidgetFieldColumnsList::DISPLAY_AS_IS) ->addValue(_('Text'), CWidgetFieldColumnsList::DISPLAY_BAR) ->setModern() )]);
But I think the values should be referencing different constants, like so:
// Display value as. $form_grid->addItem([ new CLabel(_('Display value as'), 'display_value_as'), new CFormField( (new CRadioButtonList('display_value_as', (int) $data['display_value_as'])) ->addValue(_('Numeric'), CWidgetFieldColumnsList::DISPLAY_VALUE_AS_NUMERIC) ->addValue(_('Text'), CWidgetFieldColumnsList::DISPLAY_VALUE_AS_TEXT) ->setModern() ) ]);
Right now, this isn't causing any issues with the API because DISPLAY_AS_IS and DISPLAY_BAR have values as 0 and 1, but it should be cleaned up.