3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
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 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 class CRM_UF_Form_AdvanceSetting
extends CRM_UF_Form_Group
{
20 * Build the form object for Advanced Settings.
22 * @param CRM_Core_Form $form
24 public static function buildAdvanceSetting(&$form) {
29 $form->assign('advancedFieldsConverted', $entityFields);
31 // should mapping be enabled for this group
32 $form->addElement('checkbox', 'is_map', ts('Enable mapping for this profile?'));
34 // should we allow updates on a exisitng contact
35 $form->addRadio('is_update_dupe', ts('What to do upon duplicate match'), [ts('Issue warning and do not save'), ts('Update the matching contact'), ts('Allow duplicate contact to be created')]);
36 // we do not have any url checks to allow relative urls
37 $form->addElement('text', 'post_URL', ts('Redirect URL'), CRM_Core_DAO
::getAttribute('CRM_Core_DAO_UFGroup', 'post_URL'));
39 $form->add('advcheckbox', 'add_cancel_button', ts('Include Cancel Button?'));
40 $form->addElement('text', 'cancel_URL', ts('Cancel Redirect URL'), CRM_Core_DAO
::getAttribute('CRM_Core_DAO_UFGroup', 'cancel_URL'));
42 // add select for groups
43 $group = ['' => ts('- select -')] +
$form->_group
;
44 $form->_groupElement
= &$form->addElement('select', 'group', ts('Limit listings to a specific Group?'), $group);
47 $form->addElement('text', 'notify', ts('Notify when profile form is submitted?'));
49 //group where new contacts are directed.
50 $form->addElement('select', 'add_contact_to_group', ts('Add new contacts to a Group?'), $group);
52 // add CAPTCHA To this group ?
53 $form->addElement('checkbox', 'add_captcha', ts('Include reCAPTCHA?'));
55 // should we display an edit link
56 $form->addElement('checkbox', 'is_edit_link', ts('Include profile edit links in search results?'));
58 // should we display a link to the website profile
59 $config = CRM_Core_Config
::singleton();
60 $form->addElement('checkbox', 'is_uf_link', ts('Include %1 user account information links in search results?', [1 => $config->userFramework
]));
62 // want to create cms user
63 $session = CRM_Core_Session
::singleton();
65 if ($form->_cId
= $session->get('userID')) {
69 $form->addRadio('is_cms_user', ts('%1 user account registration option?', [1 => $config->userFramework
]), [ts('No account create option'), ts('Give option, but not required'), ts('Account creation required')]);
71 // options for including Proximity Search in the profile search form
72 $form->addRadio('is_proximity_search', ts('Proximity Search'), [ts('None'), ts('Optional'), ts('Required')]);