Add Load Fundraising Scheme button

This commit is contained in:
Rich Lott / Artful Robot 2025-04-02 11:58:27 +01:00
parent 6f131d7014
commit 486b914425
2 changed files with 11 additions and 0 deletions

View file

@ -225,7 +225,14 @@
ctrl.categoryToEdit.search_data = {saved_search_id}; 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 = () => { ctrl.save = () => {
if (!confirm(ts("Confirm saving changes to categories? Note that categories will not be fully applied until tomorrow."))) { return; } if (!confirm(ts("Confirm saving changes to categories? Note that categories will not be fully applied until tomorrow."))) { return; }

View file

@ -103,6 +103,10 @@
Categories saved. Contacts will be updated shortly (when the next Scheduled Categories saved. Contacts will be updated shortly (when the next Scheduled
Job run happens). Job run happens).
</div> </div>
<p><button ng-click="$ctrl.loadFundraisingScheme()" class="btn btn-danger" ><i class="crm-i fa-people-group"></i>
{{ts('Load Fundraising Scheme starter')}}</button></p>
</form> </form>
<form ng-show="$ctrl.view === 'edit'" <form ng-show="$ctrl.view === 'edit'"