Checkbox fields on profile admin page can't be unchecked
Overview
Once mapping is enabled for a profile, you cannot disable it.
Reproduction steps
- Click on **Administer -> Custom Data and Screens -> Profiles **.
- Select Name and Address -> Settings.
- Click on Advanced Settings.
- Click the Enable Mapping for this profile? box.
- Click on Save.
- Repeat steps 2 to 4, thus clearing the Enable Mapping checkbox.
- Click on Save.
- Repeat steps 2 and 3.
- You will see that the mapping box remains ticked.
Current behaviour
The mapping box remains ticked. `
Expected behaviour
The mapping box should remain clear when it has been cleared before saving.
Environment information
- MS Edge but probably not relevant.
- CiviCRM: 5.48.alpha1/5.46.2
- PHP: 7.3.33-1+0~20211119.91+debian10~1.gbp618351/7.4__ but probably not relevant.
- CMS: Whatever the Sandbox runs under/Drupal 9.3.6 but probably not relevant.
- Database: Whatever the Sandbox runs under/MySQL 8.x but probably not relevant.
- Web Server: Whatever the Sandbox runs under/IIS 10 but probably not relevant.
Comments
This makes it impossible to turn off mapping. Note that I reproduced this on the Sandbox.