From d504c9dba7350a32dc869141ac3a0ca4a936e4e8 Mon Sep 17 00:00:00 2001 From: heddn Date: Mon, 16 Sep 2013 11:28:41 -0500 Subject: Issue #2014065 by heddn, jhodgdon: UI very confusing for Data Comparison for Boolean values --- ui/ui.data.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/ui.data.inc b/ui/ui.data.inc index 8ee91f0..aa215c3 100644 --- a/ui/ui.data.inc +++ b/ui/ui.data.inc @@ -312,10 +312,12 @@ class RulesDataUIBoolean extends RulesDataUI implements RulesDataDirectInputForm public static function inputForm($name, $info, $settings, RulesPlugin $element) { $settings += array($name => isset($info['default value']) ? $info['default value'] : NULL); // Note: Due to the checkbox even optional parameter always receive a value. + $label = check_plain($info['label']); $form[$name] = array( - '#type' => 'checkbox', - '#title' => check_plain($info['label']), + '#type' => 'radios', + '#title' => $label, '#default_value' => $settings[$name], + '#options' => array(TRUE => t('!label: True.', array('!label' => $label)), FALSE => t('!label: False.', array('!label' => $label))), ); return $form; } -- 1.7.10.4