-
-
Notifications
You must be signed in to change notification settings - Fork 814
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10609 from totten/master-case-settings
CRM-20816 - Expose CiviCase settings through "Settings" framework
- Loading branch information
Showing
10 changed files
with
303 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
/* | ||
+--------------------------------------------------------------------+ | ||
| CiviCRM version 4.7 | | ||
+--------------------------------------------------------------------+ | ||
| Copyright CiviCRM LLC (c) 2004-2017 | | ||
+--------------------------------------------------------------------+ | ||
| This file is a part of CiviCRM. | | ||
| | | ||
| CiviCRM is free software; you can copy, modify, and distribute it | | ||
| under the terms of the GNU Affero General Public License | | ||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | ||
| | | ||
| CiviCRM is distributed in the hope that it will be useful, but | | ||
| WITHOUT ANY WARRANTY; without even the implied warranty of | | ||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | ||
| See the GNU Affero General Public License for more details. | | ||
| | | ||
| You should have received a copy of the GNU Affero General Public | | ||
| License and the CiviCRM Licensing Exception along | | ||
| with this program; if not, contact CiviCRM LLC | | ||
| at info[AT]civicrm[DOT]org. If you have questions about the | | ||
| GNU Affero General Public License or the licensing of CiviCRM, | | ||
| see the CiviCRM license FAQ at http://civicrm.org/licensing | | ||
+--------------------------------------------------------------------+ | ||
*/ | ||
|
||
/** | ||
* | ||
* @package CRM | ||
* @copyright CiviCRM LLC (c) 2004-2017 | ||
*/ | ||
|
||
/** | ||
* This class generates form components for CiviCase. | ||
*/ | ||
class CRM_Admin_Form_Setting_Case extends CRM_Admin_Form_Setting { | ||
|
||
protected $_settings = array( | ||
'civicaseRedactActivityEmail' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, | ||
'civicaseAllowMultipleClients' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, | ||
'civicaseNaturalActivityTypeSort' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, | ||
); | ||
|
||
/** | ||
* Build the form object. | ||
*/ | ||
public function buildQuickForm() { | ||
CRM_Utils_System::setTitle(ts('Settings - CiviCase')); | ||
parent::buildQuickForm(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<?php | ||
/* | ||
+--------------------------------------------------------------------+ | ||
| CiviCRM version 4.7 | | ||
+--------------------------------------------------------------------+ | ||
| Copyright CiviCRM LLC (c) 2004-2017 | | ||
+--------------------------------------------------------------------+ | ||
| This file is a part of CiviCRM. | | ||
| | | ||
| CiviCRM is free software; you can copy, modify, and distribute it | | ||
| under the terms of the GNU Affero General Public License | | ||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | ||
| | | ||
| CiviCRM is distributed in the hope that it will be useful, but | | ||
| WITHOUT ANY WARRANTY; without even the implied warranty of | | ||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | ||
| See the GNU Affero General Public License for more details. | | ||
| | | ||
| You should have received a copy of the GNU Affero General Public | | ||
| License and the CiviCRM Licensing Exception along | | ||
| with this program; if not, contact CiviCRM LLC | | ||
| at info[AT]civicrm[DOT]org. If you have questions about the | | ||
| GNU Affero General Public License or the licensing of CiviCRM, | | ||
| see the CiviCRM license FAQ at http://civicrm.org/licensing | | ||
+--------------------------------------------------------------------+ | ||
*/ | ||
|
||
/** | ||
* | ||
* @package CRM | ||
* @copyright CiviCRM LLC (c) 2004-2017 | ||
* $Id$ | ||
* | ||
*/ | ||
|
||
/** | ||
* Settings metadata file | ||
*/ | ||
return array( | ||
'civicaseRedactActivityEmail' => array( | ||
'group_name' => 'CiviCRM Preferences', | ||
'group' => 'core', | ||
'name' => 'civicaseRedactActivityEmail', | ||
'type' => 'String', | ||
'quick_form_type' => 'Select', | ||
'html_type' => 'Select', | ||
'html_attributes' => array( | ||
//'class' => 'crm-select2', | ||
), | ||
'default' => 'default', | ||
'add' => '4.7', | ||
'title' => 'Redact Activity Email', | ||
'is_domain' => 1, | ||
'is_contact' => 0, | ||
'pseudoconstant' => array( | ||
'callback' => 'CRM_Case_Info::getRedactOptions', | ||
), | ||
'description' => 'Should activity emails be redacted? (Set "Default" to load setting from the legacy "Settings.xml" file.)', | ||
'help_text' => '', | ||
), | ||
'civicaseAllowMultipleClients' => array( | ||
'group_name' => 'CiviCRM Preferences', | ||
'group' => 'core', | ||
'name' => 'civicaseAllowMultipleClients', | ||
'type' => 'String', | ||
'quick_form_type' => 'Select', | ||
'html_type' => 'Select', | ||
'html_attributes' => array( | ||
//'class' => 'crm-select2', | ||
), | ||
'default' => 'default', | ||
'add' => '4.7', | ||
'title' => 'Allow Multiple Case Clients', | ||
'is_domain' => 1, | ||
'is_contact' => 0, | ||
'pseudoconstant' => array( | ||
'callback' => 'CRM_Case_Info::getMultiClientOptions', | ||
), | ||
'description' => 'How many clients may be associated with a given case? (Set "Default" to load setting from the legacy "Settings.xml" file.)', | ||
'help_text' => '', | ||
), | ||
'civicaseNaturalActivityTypeSort' => array( | ||
'group_name' => 'CiviCRM Preferences', | ||
'group' => 'core', | ||
'name' => 'civicaseNaturalActivityTypeSort', | ||
'type' => 'String', | ||
'quick_form_type' => 'Select', | ||
'html_type' => 'Select', | ||
'html_attributes' => array( | ||
//'class' => 'crm-select2', | ||
), | ||
'default' => 'default', | ||
'add' => '4.7', | ||
'title' => 'Activity Type Sorting', | ||
'is_domain' => 1, | ||
'is_contact' => 0, | ||
'pseudoconstant' => array( | ||
'callback' => 'CRM_Case_Info::getSortOptions', | ||
), | ||
'description' => 'How to sort activity-types on the "Manage Case" screen? (Set "Default" to load setting from the legacy "Settings.xml" file.)', | ||
'help_text' => '', | ||
), | ||
); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{* | ||
+--------------------------------------------------------------------+ | ||
| CiviCRM version 4.7 | | ||
+--------------------------------------------------------------------+ | ||
| Copyright CiviCRM LLC (c) 2004-2017 | | ||
+--------------------------------------------------------------------+ | ||
| This file is a part of CiviCRM. | | ||
| | | ||
| CiviCRM is free software; you can copy, modify, and distribute it | | ||
| under the terms of the GNU Affero General Public License | | ||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | ||
| | | ||
| CiviCRM is distributed in the hope that it will be useful, but | | ||
| WITHOUT ANY WARRANTY; without even the implied warranty of | | ||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | ||
| See the GNU Affero General Public License for more details. | | ||
| | | ||
| You should have received a copy of the GNU Affero General Public | | ||
| License and the CiviCRM Licensing Exception along | | ||
| with this program; if not, contact CiviCRM LLC | | ||
| at info[AT]civicrm[DOT]org. If you have questions about the | | ||
| GNU Affero General Public License or the licensing of CiviCRM, | | ||
| see the CiviCRM license FAQ at http://civicrm.org/licensing | | ||
+--------------------------------------------------------------------+ | ||
*} | ||
<div class="crm-block crm-form-block crm-case-form-block"> | ||
{*<div class="help">*} | ||
{*{ts}...{/ts} {docURL page="Debugging for developers" resource="wiki"}*} | ||
{*</div>*} | ||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div> | ||
<table class="form-layout"> | ||
<tr class="crm-case-form-block-civicaseRedactActivityEmail"> | ||
<td class="label">{$form.civicaseRedactActivityEmail.label}</td> | ||
<td>{$form.civicaseRedactActivityEmail.html}<br /> | ||
<span class="description">{ts}Should activity emails be redacted?{/ts} {ts}(Set "Default" to load setting from the legacy "Settings.xml" file.){/ts}</span> | ||
</td> | ||
</tr> | ||
<tr class="crm-case-form-block-civicaseAllowMultipleClients"> | ||
<td class="label">{$form.civicaseAllowMultipleClients.label}</td> | ||
<td>{$form.civicaseAllowMultipleClients.html}<br /> | ||
<span class="description">{ts}How many clients may be associated with a given case?{/ts} {ts}(Set "Default" to load setting from the legacy "Settings.xml" file.){/ts}</span> | ||
</td> | ||
</tr> | ||
<tr class="crm-case-form-block-civicaseNaturalActivityTypeSort"> | ||
<td class="label">{$form.civicaseNaturalActivityTypeSort.label}</td> | ||
<td>{$form.civicaseNaturalActivityTypeSort.html}<br /> | ||
<span class="description">{ts}How to sort activity-types on the "Manage Case" screen? {/ts} {ts}(Set "Default" to load setting from the legacy "Settings.xml" file.){/ts}</span> | ||
</td> | ||
</tr> | ||
</table> | ||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> | ||
<div class="spacer"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters