Commit b182df8a authored by Johan Vervloet's avatar Johan Vervloet
Browse files

Enables marking option values as inactive in the json configuration file.

I added one commit to @klevie's pull request (#6).

If you don't specify 'is_active' for an option value, it is assumed
to be active. But you can now disable option values using
configitems by setting 'is_active' to 0.
parent 47d49039
......@@ -45,7 +45,11 @@ class CRM_Civiconfig_Entity_OptionValue extends CRM_Civiconfig_Entity {
if (isset($existing['id'])) {
$this->_apiParams['id'] = $existing['id'];
$this->_apiParams['is_active'] = 1;
if (!isset($this->_apiParams['is_active'])) {
// If is_active is not explicitely given, assume that the option value
// should be active.
$this->_apiParams['is_active'] = 1;
$this->_apiParams['is_reserved'] = 1;
if (!isset($this->_apiParams['label'])) {
$this->_apiParams['label'] = ucfirst($this->_apiParams['name']);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment