Merge pull request #12064 from seamuslee001/nfc_rename_groupby_function
[civicrm-core.git] / CRM / Core / Form.php
index 015b8390a7ca7f127234c938dd3723ea348633f3..13bc59e3396a756315823a0339a8aae3a7659f1b 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.7                                                |
+ | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2018                                |
  +--------------------------------------------------------------------+
@@ -408,6 +408,12 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
       }
     }
 
+    // Add context for the editing of option groups
+    if (isset($extra['option_context'])) {
+      $context = json_encode($extra['option_context']);
+      $element->setAttribute('data-option-edit-context', $context);
+    }
+
     return $element;
   }