CiviCase - Clear value before reusing editCaseRoleDialog
authorcolemanw <coleman@civicrm.org>
Wed, 22 Nov 2023 19:35:25 +0000 (14:35 -0500)
committercolemanw <coleman@civicrm.org>
Wed, 22 Nov 2023 19:35:25 +0000 (14:35 -0500)
templates/CRM/Case/Form/CaseView.js
templates/CRM/Case/Form/CaseView.tpl

index 192a52b8670715c593a104230965e222aaa87ba5..0e4bd9b71a2709ca48799112012744ff5fe37fda 100644 (file)
@@ -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) {
index dc6b80ea4071def597ebe7d73085b4784ef27ae6..580888b91baa9843e5b8a52ab169e1ae9fa4f530 100644 (file)
       {/if}
 
       <div id="editCaseRoleDialog" class="hiddenElement">
-        <div><label for="edit_role_contact_id">{ts}Change To{/ts}:</label></div>
+        <div><label for="edit_role_contact_id">{ts}Change To{/ts} <span class="crm-marker">*</span></label></div>
         <div><input name="edit_role_contact_id" placeholder="{ts}- select contact -{/ts}" class="huge" /></div>
       </div>
       <div id="caseRoles-selector-show-active">