From 499d6072f1245d4fecb3ba5c7ddeaf3f06312a7c Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 14 Jun 2021 23:20:45 -0700 Subject: [PATCH] msgtplui - Hide reserved/original values --- ext/msgtplui/ang/msgtplui/User.js | 2 +- ext/msgtplui/ang/msgtplui/Workflow.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/msgtplui/ang/msgtplui/User.js b/ext/msgtplui/ang/msgtplui/User.js index a912b7129c..87200fa616 100644 --- a/ext/msgtplui/ang/msgtplui/User.js +++ b/ext/msgtplui/ang/msgtplui/User.js @@ -11,7 +11,7 @@ records: function(crmApi4, crmStatus) { var q = crmApi4('MessageTemplate', 'get', { select: ["id", "msg_title", "msg_subject", "is_active"], - where: [["workflow_name", "IS EMPTY"]], + where: [["workflow_name", "IS EMPTY"], ["is_reserved", "=", "0"]], orderBy: {"msg_title":"ASC"}, }); return crmStatus({start: ts('Loading...'), success: ''}, q); diff --git a/ext/msgtplui/ang/msgtplui/Workflow.js b/ext/msgtplui/ang/msgtplui/Workflow.js index 2121aee7b4..b007c64122 100644 --- a/ext/msgtplui/ang/msgtplui/Workflow.js +++ b/ext/msgtplui/ang/msgtplui/Workflow.js @@ -12,7 +12,7 @@ var q= crmApi4('MessageTemplate', 'get', { select: ["id", "msg_title", "tx.language:label", "tx.language", "is_default"], join: [["Translation AS tx", "LEFT", null, ["tx.entity_table", "=", "'civicrm_msg_template'"], ["tx.entity_id", "=", "id"]]], - where: [["workflow_name", "IS NOT EMPTY"]], + where: [["workflow_name", "IS NOT EMPTY"], ["is_reserved", "=", "0"]], groupBy: ["id", "tx.language"], orderBy: {"msg_title":"ASC", "tx.language:label":"ASC"}, chain: {"statuses":["Translation", "get", {"select":["status_id:name"], "where":[["entity_table", "=", "civicrm_msg_template"], ["entity_id", "=", "$id"], ["language", "=", "$tx.language"]], "groupBy":["status_id"]}, "status_id:name"]} -- 2.25.1