From 2bc7601f9e9f80bc91cc1e04c0d60d07b664ae63 Mon Sep 17 00:00:00 2001 From: Camilo Rodriguez Date: Tue, 24 Oct 2017 17:44:09 +0000 Subject: [PATCH] CRM-21328: Remove '-select-' Option From Visibility As the visibility per option field is not mandatory, the user can choose the empty option and save the field. This caused some PHP warnings to be issued on event registration forms that used the field with empty visibility options. Removed the empty option from the visibility per option select. --- CRM/Price/Form/Field.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Price/Form/Field.php b/CRM/Price/Form/Field.php index 75ce1a44b1..d61dd371cb 100644 --- a/CRM/Price/Form/Field.php +++ b/CRM/Price/Form/Field.php @@ -308,7 +308,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form { // is active ? $this->add('checkbox', 'option_status[' . $i . ']', ts('Active?')); - $this->add('select', 'option_visibility_id[' . $i . ']', ts('Visibility'), array('' => ts('- select -')) + $visibilityType); + $this->add('select', 'option_visibility_id[' . $i . ']', ts('Visibility'), $visibilityType); $defaultOption[$i] = $this->createElement('radio', NULL, NULL, NULL, $i); //for checkbox handling of default option -- 2.25.1