civicrm/civihr — pull request #36 by ravishnair (2013-07-11 11:34:36+00:00)
Title: -- CRM-12946 added "is_visa_required" checkbox in Immigration Tab

In this issue, I did the following to add the checkbox and handle it through ajax api:
1. Used CRM_Core_Region::instance() within hook_civicrm_buildProfile hook to add the checkbox within Immigration tab.
2. Created a custom group Immigration summary which has the checkbox field "is_visa_required" so that a custom table will be created which can be used in step 3 to store the value of the checkbox created in step 1.
3. Now, to provide the checkbox created in step 1 with CRM.api support i.e. to store the value(1 or 0) of checkbox, I used the custom field table created in step 2. So, now when we click on the checkbox, its value will be passed as a value for the column of is_visa_required customfield in the db and will be stored through ajax api within the custom table.