From 486b914425ac6ac85c07eeda767d7056cf3e4746 Mon Sep 17 00:00:00 2001 From: Rich Lott / Artful Robot Date: Wed, 2 Apr 2025 11:58:27 +0100 Subject: [PATCH] Add Load Fundraising Scheme button --- ang/crmContactcats.js | 7 +++++++ ang/crmContactcats/crmContactCategorySettings.html | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/ang/crmContactcats.js b/ang/crmContactcats.js index 9fb8e4a..1377cab 100644 --- a/ang/crmContactcats.js +++ b/ang/crmContactcats.js @@ -225,7 +225,14 @@ ctrl.categoryToEdit.search_data = {saved_search_id}; } }; + ctrl.loadFundraisingScheme = async () => { + if (!confirm(ts("This will DELETE all your categories and REPLACE them with a shipped set of fundraising focussed searches. Continue?"))) { + return; + } + await crmApi4('ContactCategoryDefinition', 'setup', {scheme: 'ForumZFDFundraising1'}); + window.location.reload(); + }; ctrl.save = () => { if (!confirm(ts("Confirm saving changes to categories? Note that categories will not be fully applied until tomorrow."))) { return; } diff --git a/ang/crmContactcats/crmContactCategorySettings.html b/ang/crmContactcats/crmContactCategorySettings.html index b699d6b..fd2c8fb 100644 --- a/ang/crmContactcats/crmContactCategorySettings.html +++ b/ang/crmContactcats/crmContactCategorySettings.html @@ -103,6 +103,10 @@ Categories saved. Contacts will be updated shortly (when the next Scheduled Job run happens). + +

+