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

Additional Grant fields don't appear when Activities are loaded first #6

Open
MegaphoneJon opened this issue Jul 5, 2019 · 0 comments

Comments

@MegaphoneJon
Copy link
Contributor

Steps to replicate:

  • Click Grants menu » New Grant. Note how the fields added by this extension (i.e. batch selector, exposed financial type field) appear correctly.
  • Click Add New Grant from the Grants tab of a contact. Again, fields appear correctly.
  • Now, open a contact, view their Activities tab, THEN click Add New Grant from the Grants tab. Note how the fields no longer appear.

The reason is in the JS in "GrantExtra.tpl". It makes multiple references to $('#status_id'). While that SHOULD be a unique identifier, the activity tab loads its own #status_id selector, so that takes precedence, breaking the JS.

I patched my own version, but I also broke out the JS into its own file, making this harder to review. If you want to patch the same bug, just replace all references in the JS in GrantExtra.tpl from $("#status_id") to $("#status_id[data-api-entity='Grant']").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant