Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use template variable to add or remove swap button. #21003

Merged
merged 1 commit into from
Aug 4, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Use template variable to add or remove swap button.

Before

Rendering of 'swap button' swap

on activity form driven by whether or not the activity assignee field is frozen

full form

After

Presence rendered by a template variable

Technical Details

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

This doesn't wind up being any more supported than the js but it will be easier for us to write a unit test within the extension to ensure it doesn't quietly stop working

Comments

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
@civibot
Copy link

civibot bot commented Aug 3, 2021

(Standard links)

@civibot civibot bot added the master label Aug 3, 2021
@aydun
Copy link
Contributor

aydun commented Aug 4, 2021

Makes sense to me.

@demeritcowboy
Copy link
Contributor

I'm trying not to think too hard about this. Just noting the limit/freeze/hiding currently only comes into effect on edit.

@demeritcowboy demeritcowboy merged commit 51e58f8 into civicrm:master Aug 4, 2021
@colemanw colemanw deleted the swapsies branch August 4, 2021 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants