Details
-
Type: Task
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: None
-
Fix Version/s: 1.8
-
Component/s: Core CiviCRM
-
Labels:None
Description
Currently, when a Profile is disabled we retain the related uf_join record(s). This results in some undesirable behaviors - for example trying to view a Contribution page which includes a disabled profile results in the following error (which is not useful as it does not provide the reason for the error):
"This profile is not configured for the requested action. Contact the site administrator if you need assistance."
... and we do not allow user's to Delete a profile if there are uf_join records for it.
With the changes below, the logic for Disable and Delete will be consistent.
Implementation
----------------------
User interface becomes the same for both Disable and Delete actions:
1. Remove the Jscript confirm from the Disable action - we'll use a confirm page for this instead as we do for "Delete".
2. When user clicks "Disable" or "Delete" action - check if there are records for this uf_group in the uf_join table. If none, show standard confirm messages:
"Are you sure you want to disable this Profile?"
"Are you sure you want to delete this Profile? This action can not be undone"
3. If there are one or more uf_join records, create a "Used For" list to display. We should be able to use the list construct code currently implemented for the "Used For" column in the uf_group selector. The confirmation prompts are:
"This profile is currently used for $usedForList. If you disable the profile - it will be removed from these forms and/or modules. Do you want to continue?"
"This profile is currently used for $usedForList. If you delete the profile - it will be removed from these forms and/or modules. This action can not be undone. Do you want to continue?"
4. Form buttons are:
"Disable Profile"
" Delete Profile" (was "Delete Profile Group")
"Cancel"
5. On confirm - delete all related uf_join records for both Disable and Delete Actions. Then disable uf_group record (disable action) OR delete uf_field and uf_group records (delete action).