From ef3a048af52e5ff9b06af337e5a119ca00295f3c Mon Sep 17 00:00:00 2001 From: Tim Mallezie Date: Mon, 20 Apr 2015 08:24:25 +0200 Subject: [PATCH] add allowClear attribute --- CRM/Core/Form.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 3568b2d62f..3a05f9884e 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1257,7 +1257,10 @@ class CRM_Core_Form extends HTML_QuickForm_Page { case 'Radio': $separator = isset($props['separator']) ? $props['separator'] : NULL; unset($props['seperator']); - $this->addRadio($name, $label, $options, NULL, $separator, $required); + if (!isset($props['allowClear'])) { + $attributes['allowClear'] = !$required; + } + $this->addRadio($name, $label, $options, $attributes, $separator, $required); break; case 'Select': -- 2.25.1