From 02efa7e9763f7cd71846dcb3740d8e0c49fb57fb Mon Sep 17 00:00:00 2001 From: colemanw Date: Wed, 22 Nov 2023 14:35:25 -0500 Subject: [PATCH] CiviCase - Clear value before reusing editCaseRoleDialog --- templates/CRM/Case/Form/CaseView.js | 2 ++ templates/CRM/Case/Form/CaseView.tpl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/CRM/Case/Form/CaseView.js b/templates/CRM/Case/Form/CaseView.js index 192a52b867..0e4bd9b71a 100644 --- a/templates/CRM/Case/Form/CaseView.js +++ b/templates/CRM/Case/Form/CaseView.js @@ -97,6 +97,8 @@ }, '#editCaseRoleDialog': { pre: function(data) { + // Clear stale value since this form can be reused multiple times + $('[name=edit_role_contact_id]', this).val(''); prepareRelationshipField(data.rel_type, $('[name=edit_role_contact_id]', this)); }, post: function(data) { diff --git a/templates/CRM/Case/Form/CaseView.tpl b/templates/CRM/Case/Form/CaseView.tpl index dc6b80ea40..580888b91b 100644 --- a/templates/CRM/Case/Form/CaseView.tpl +++ b/templates/CRM/Case/Form/CaseView.tpl @@ -147,7 +147,7 @@ {/if}
-
+
-- 2.25.1