Fix up OptionGroup Form
authorSeamus Lee <seamuslee001@gmail.com>
Thu, 21 Jul 2016 00:07:20 +0000 (10:07 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Sat, 10 Sep 2016 21:53:24 +0000 (07:53 +1000)
CRM/Admin/Form/OptionGroup.php
CRM/Admin/Form/Options.php
templates/CRM/Admin/Form/OptionGroup.tpl

index 7fbe79817888a9d3f0bc5d200905cb76b2ebc68a..9ef3380259ac81c499b5ff949e980fca6101dc83 100644 (file)
@@ -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) {
index 3ff8e98ec3ca19baabe17105444a20388b0c120b..41d149be92809c0c1f70c5f5eb7efe8081da76bc 100644 (file)
@@ -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(
index c9db7e198aabeb9becd1a7b41a7f560a168d155b..d9c5588dd160aec95d43f8ef3b2e4f53f40085d0 100644 (file)
           </tr>
         <td class="label">{$form.name.label}</td>
               <td>{$form.name.html}</td></tr>
+          <tr class="crm-admin-optiongroup-form-block-data-type">
+            <td class="label">{$form.data_type.label}</td>
+            <td>{$form.data_type.html}</td>
+          </tr>
           <tr class="crm-admin-optiongroup-form-block-is_active">
               <td class="label">{$form.is_active.label}</td>
               <td>{$form.is_active.html}</td>