-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Disable inline-edit of multi-record custom fields in profiles #12312
Disable inline-edit of multi-record custom fields in profiles #12312
Conversation
(Standard links)
|
I applied these changes to a test site I had set up using Civi 5.1.2. The changes worked when I was logged in as the administrator. No more error was appearing, and I was able to use the inline editing for the dropdown lists in the profile to update values. However, the changes produced another jquery error, a 403 Forbidden error, when I was not logged in as the administrator, but had view edit and delete privileges for the profile. The error was:
This was then followed by the original jQuery error:
You can see the new error produced when clicking on the profile dropdowns at the test profile page at http://drupal.benmango.co.uk/civicrm/profile/edit?gid=14&reset=1&id=109. |
@bmango does your user have "access ajax api" permission? |
@colemanw - no they didn't. I have now given them permission, and this has solved the first jQuery error (403 Forbidden), but the second jQuery error is still there:
|
I've just attempted to reproduce this by creating a new user and taking away "administer CiviCRM" permission but the profile still worked ok. There must be some permission at play here but I'm not sure which one it is. Can you try adding more permissions to your test user until it works? Let's try to figure out which one it is and then add some code to the JS to check for that permission before attempting the inline edit. |
I have tried adding individual permissions. The only one that fixed it was when I added "access CiviCRM". I had already added "administer CiviCRM" as well as add, edit, view and deleting all contacts, which had not fixed the issue. On the test site I was allowing anonymous visitors access to the form, but I also created a user as well and this didn't make any difference. |
581d17b
to
13f7c84
Compare
@bmango I've updated this PR to simply not allow inline-edit via profiles instead of trying to fix it, as I don't think it was ever intended to be used in that context anyway. |
@colemanw Thanks very much for looking at this. Disabling the inline edit makes total sense. |
@bmango thanks. If you get a chance to test this PR and confirm it works, we're good to merge :) |
@civicrm-builder retest this please |
@colemanw - I have tested that and it works great. There is no longer the ability to edit the fields inline. Everything else is working fine. Many thanks! |
Jenkins re test this please |
Overview
Fixes a bug when editing multirecord custom fields in a profile form.
Steps to Reproduce
After
Profile does not allow inline-edit.
Notes
This was reported on StackExchange: https://civicrm.stackexchange.com/questions/25166/disable-inline-editing-of-fields-in-profile-form