From: Seamus Lee Date: Thu, 21 Jul 2016 00:07:20 +0000 (+1000) Subject: Fix up OptionGroup Form X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1d4e5453d88cf7a1eec89bfd85819023ea2d72b3;p=civicrm-core.git Fix up OptionGroup Form --- diff --git a/CRM/Admin/Form/OptionGroup.php b/CRM/Admin/Form/OptionGroup.php index 7fbe798178..9ef3380259 100644 --- a/CRM/Admin/Form/OptionGroup.php +++ b/CRM/Admin/Form/OptionGroup.php @@ -78,7 +78,7 @@ class CRM_Admin_Form_OptionGroup extends CRM_Admin_Form { CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionGroup', 'description') ); - $this->addSelect('Data Type', CRM_Utils_Type::dataTypes(), TRUE); + $this->addSelect('data_type', array('options' => CRM_Utils_Type::dataTypes()), TRUE); $element = $this->add('checkbox', 'is_active', ts('Enabled?')); if ($this->_action & CRM_Core_Action::UPDATE) { diff --git a/CRM/Admin/Form/Options.php b/CRM/Admin/Form/Options.php index 3ff8e98ec3..41d149be92 100644 --- a/CRM/Admin/Form/Options.php +++ b/CRM/Admin/Form/Options.php @@ -391,9 +391,9 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { /** * Get the DataType for a specified Option Group. * - * @param string $optionGroupname name of the option group + * @param string $optionGroupName name of the option group * - * @return string|bool + * @return string|null */ public static function getOptionGroupDataType($optionGroupName) { $optionGroup = civicrm_api3('OptionGroup', 'get', array( diff --git a/templates/CRM/Admin/Form/OptionGroup.tpl b/templates/CRM/Admin/Form/OptionGroup.tpl index c9db7e198a..d9c5588dd1 100644 --- a/templates/CRM/Admin/Form/OptionGroup.tpl +++ b/templates/CRM/Admin/Form/OptionGroup.tpl @@ -44,6 +44,10 @@ {$form.name.label} {$form.name.html} + + {$form.data_type.label} + {$form.data_type.html} + {$form.is_active.label} {$form.is_active.html}