From 66504fe47a072dcdddc9288e360ff6dcaa6cf03d Mon Sep 17 00:00:00 2001 From: Camilo Rodriguez Date: Wed, 6 Dec 2017 13:01:30 +0000 Subject: [PATCH] CRM-21520: Add Case Selection Control From Back-end --- CRM/Case/Form/AddToCaseAsRole.php | 13 ++++++++++++- templates/CRM/Case/Form/AddToCaseAsRole.tpl | 16 ++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/CRM/Case/Form/AddToCaseAsRole.php b/CRM/Case/Form/AddToCaseAsRole.php index 6f42c596e3..a4a3b9e988 100644 --- a/CRM/Case/Form/AddToCaseAsRole.php +++ b/CRM/Case/Form/AddToCaseAsRole.php @@ -18,16 +18,27 @@ class CRM_Case_Form_AddToCaseAsRole extends CRM_Contact_Form_Task { 'role_type', ts('Relationship Type'), array('' => ts('- select type -')) + $roleTypes, - FALSE, + TRUE, array('class' => 'crm-select2 twenty') ); + $this->addEntityRef( + 'assign_to', + ts('Assign to'), + array('entity' => 'case'), + TRUE + ); + $this->addButtons(array( array( 'type' => 'submit', 'name' => ts('Submit'), 'isDefault' => TRUE, ), + array( + 'type' => 'cancel', + 'name' => ts('Cancel'), + ), )); } diff --git a/templates/CRM/Case/Form/AddToCaseAsRole.tpl b/templates/CRM/Case/Form/AddToCaseAsRole.tpl index bef98d3604..c88e4e8ceb 100644 --- a/templates/CRM/Case/Form/AddToCaseAsRole.tpl +++ b/templates/CRM/Case/Form/AddToCaseAsRole.tpl @@ -1,19 +1,7 @@ -
-
+
+
{$form.assign_to.html}
{$form.role_type.label}
{$form.role_type.html}

{include file="CRM/common/formButtons.tpl" location="bottom"}
- -{literal} - -{/literal} -- 2.25.1