Merge pull request #18631 from eileenmcnaughton/ppp
[civicrm-core.git] / CRM / Contact / Form / Edit / Demographics.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 */
17
18 /**
19 * Form helper class for an Demographics object.
20 */
21 class CRM_Contact_Form_Edit_Demographics {
22
23 /**
24 * Build the form object elements for Demographics object.
25 *
26 * @param CRM_Core_Form $form
27 * Reference to the form object.
28 */
29 public static function buildQuickForm(&$form) {
30 $form->addField('gender_id', ['entity' => 'contact', 'type' => 'Radio', 'allowClear' => TRUE]);
31
32 $form->addField('birth_date', ['entity' => 'contact'], FALSE, FALSE);
33
34 $form->addField('is_deceased', ['entity' => 'contact', 'label' => ts('Contact is Deceased'), 'onclick' => "showDeceasedDate()"]);
35 $form->addField('deceased_date', ['entity' => 'contact'], FALSE, FALSE);
36 }
37
38 /**
39 * Set default values for the form. Note that in edit/view mode
40 * the default values are retrieved from the database
41 *
42 *
43 * @param CRM_Core_Form $form
44 * @param array $defaults
45 */
46 public static function setDefaultValues(&$form, &$defaults) {
47 }
48
49 }