Use template variable to add or remove swap button.
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 3 Aug 2021 23:30:19 +0000 (11:30 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 3 Aug 2021 23:30:22 +0000 (11:30 +1200)
commit8eaec91e05b669fee82ee5f603591fd62ba2dd4d
treefe80e504f79d6051f3a11ebd96d451a6e6ad6c4f
parentf78023f5f8a0c94efe75e3ce7e75d73dddc5edd9
Use template variable to add or remove swap button.

In combination with email notifications this button can be dangerous - ie an accidental click and
a donor rather than a staff member gets the email.

My thinking is to disable this via the activity assignee extension,
https://lab.civicrm.org/extensions/assignee/-/issues/2 - but it's cleaner for
an extension to intervene by setting a smarty variable than using javascript
to remove the button and I feel like it makes more sense for the form to
assign 'instruction variables' than for the decision to freeze to
also have 'hidden' effects further down
CRM/Activity/Form/Activity.php
templates/CRM/Activity/Form/Activity.tpl