diff --git a/CRM/Civirules/Action.php b/CRM/Civirules/Action.php index 96ec56db91100cabae87d418574dffe39ea56a70..aa27b8600116ad2bbb5c89e77f7afa58f707446e 100644 --- a/CRM/Civirules/Action.php +++ b/CRM/Civirules/Action.php @@ -118,7 +118,7 @@ abstract class CRM_Civirules_Action { $context['action_label'] = CRM_Civirules_BAO_Action::getActionLabelWithId($this->ruleAction['action_id']); $context['action_parameters'] = $this->userFriendlyConditionParams(); $context['contact_id'] = $eventData ? $eventData->getContactId() : - 1; - $msg = "{action_label} ({rule_action_id}\r\n\r\n{message}\r\n\r\nRule: '{rule_title}' with id {rule_id}"; + $msg = "{action_label} (ID: {rule_action_id})\r\n\r\n{message}\r\n\r\nRule: '{rule_title}' with id {rule_id}"; if ($context['contact_id'] > 0) { $msg .= "\r\nFor contact: {contact_id}"; } diff --git a/CRM/Civirules/Condition.php b/CRM/Civirules/Condition.php index 962384c5dbfd929923691f028d315eb87459ccf0..0ae377a1334e6f676f7288adabecbaed1e3faff2 100644 --- a/CRM/Civirules/Condition.php +++ b/CRM/Civirules/Condition.php @@ -87,7 +87,7 @@ abstract class CRM_Civirules_Condition { $context['condition_label'] = CRM_Civirules_BAO_Condition::getConditionLabelWithId($this->ruleCondition['condition_id']); $context['condition_parameters'] = $this->userFriendlyConditionParams(); $context['contact_id'] = $eventData ? $eventData->getContactId() : - 1; - $msg = "{condition_label} ({rule_condition_id}\r\n\r\n{message}\r\n\r\nRule: '{rule_title}' with id {rule_id}"; + $msg = "{condition_label} (ID: {rule_condition_id})\r\n\r\n{message}\r\n\r\nRule: '{rule_title}' with id {rule_id}"; if ($context['contact_id'] > 0) { $msg .= "\r\nFor contact: {contact_id}"; } diff --git a/CRM/Civirules/Form/Rule.php b/CRM/Civirules/Form/Rule.php index a281e08ed202c7abcded3f458da4a145ce38abd5..af58b548b77706f0bb11e3d2a1f96abefd02dd11 100755 --- a/CRM/Civirules/Form/Rule.php +++ b/CRM/Civirules/Form/Rule.php @@ -17,6 +17,8 @@ class CRM_Civirules_Form_Rule extends CRM_Core_Form { protected $event; + protected $postRuleBlock = ''; + /** * @var CRM_Civirules_Event */ @@ -30,9 +32,31 @@ class CRM_Civirules_Form_Rule extends CRM_Core_Form { function buildQuickForm() { $this->setFormTitle(); $this->createFormElements(); + $this->assign('postRuleBlock', $this->postRuleBlock); parent::buildQuickForm(); } + /** + * Post rule details are shown on the form just between the rule name and the + * linked trigger + * + * @return string + */ + public function getPostRuleBlock() { + return $this->postRuleBlock; + } + + /** + * Post rule details are shown on the form just between the rule name and the + * linked trigger + * + * @param $postRuleDetails + */ + public function setPostRuleBlock($postRuleBlock) { + $this->postRuleBlock = $postRuleBlock; + $this->assign('postRuleBlock', $this->postRuleBlock); + } + /** * Function to perform processing before displaying form (overrides parent function) * diff --git a/CRM/CivirulesConditions/FieldValueComparison.php b/CRM/CivirulesConditions/FieldValueComparison.php index 4afe8470099b79356c3f473f71ba4ed8080723b6..ad9bb6c8c6ebed6c4940d11c3670c0014a72f10e 100644 --- a/CRM/CivirulesConditions/FieldValueComparison.php +++ b/CRM/CivirulesConditions/FieldValueComparison.php @@ -14,7 +14,7 @@ class CRM_CivirulesConditions_FieldValueComparison extends CRM_CivirulesConditio protected function getFieldValue(CRM_Civirules_EventData_EventData $eventData) { $entity = $this->conditionParams['entity']; $field = $this->conditionParams['field']; - + $data = $eventData->getEntityData($entity); if (isset($data[$field])) { return $this->normalizeValue($data[$field]); diff --git a/templates/CRM/Civirules/Form/RuleBlocks/RuleBlock.tpl b/templates/CRM/Civirules/Form/RuleBlocks/RuleBlock.tpl index 90fb8854213cec62bee64eef122cee6a9afa1e3f..1d16336d611d712062d34781ca7758d18dfe30ae 100755 --- a/templates/CRM/Civirules/Form/RuleBlocks/RuleBlock.tpl +++ b/templates/CRM/Civirules/Form/RuleBlocks/RuleBlock.tpl @@ -20,5 +20,6 @@ <div class="label">{$form.rule_created_contact.label}</div> <div class="content">{$form.rule_created_contact.value}</div> <div class="clear"></div> - </div> + </div> + {$postRuleBlock} </div>