Commit 0b9a0124 authored by Christian Wach's avatar Christian Wach
Browse files

Add constant to choose whether or not to make "Details" required

parent fd05413c
......@@ -117,8 +117,10 @@ class CRM_CallNextActivityBlock_Form_Inline_CallNextActivityBlock extends CRM_Co
'placeholder' => ts('Type call notes here. Maximum length 2500 characters.'),
], FALSE, []);
// Make it required.
$this->addRule('details', ts('%1 is a required field.', [1 => ts('Details')]), 'required');
// Maybe make it required.
if (defined('CALLNEXT_DASHLET_DETAILS_REQUIRED') && CALLNEXT_DASHLET_DETAILS_REQUIRED) {
$this->addRule('details', ts('%1 is a required field.', [1 => ts('Details')]), 'required');
}
// Add Rich Text Editor for details.
//$this->add('wysiwyg', 'details', ts('Details'), [
......
<?php
/**
* Define Extension constants.
*
* @since 2.0.2
*/
if (!defined('CALLNEXT_DASHLET_DETAILS_REQUIRED')) {
define('CALLNEXT_DASHLET_DETAILS_REQUIRED', TRUE);
}
require_once 'callnext.civix.php';
use CRM_CallNextDashlet_ExtensionUtil as E;
......
Supports Markdown
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