Apiv4 can't handle it as is...
*
* Generated from xml/schema/CRM/Core/UFGroup.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:c8d65a421dc23cef070b148a190b37b0)
+ * (GenCodeChecksum:e1091f92ebe03a9ff5c6c73c015e8d72)
*/
/**
public $limit_listings_group_id;
/**
- * Redirect to URL.
+ * Redirect to URL on submit.
*
* @var string|null
* (SQL type: varchar(255))
* Note that values will be retrieved from the database as a string.
*/
- public $post_URL;
+ public $post_url;
/**
* foreign key to civicrm_group_id
public $is_update_dupe;
/**
- * Redirect to URL when Cancle button clik .
+ * Redirect to URL when Cancel button clicked .
*
* @var string|null
* (SQL type: varchar(255))
* Note that values will be retrieved from the database as a string.
*/
- public $cancel_URL;
+ public $cancel_url;
/**
* Should we create a cms user for this profile
],
'add' => '1.4',
],
- 'post_URL' => [
- 'name' => 'post_URL',
+ 'post_url' => [
+ 'name' => 'post_url',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Post Url'),
- 'description' => ts('Redirect to URL.'),
+ 'description' => ts('Redirect to URL on submit.'),
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'usage' => [
'duplicate_matching' => FALSE,
'token' => FALSE,
],
- 'where' => 'civicrm_uf_group.post_URL',
+ 'where' => 'civicrm_uf_group.post_url',
'table_name' => 'civicrm_uf_group',
'entity' => 'UFGroup',
'bao' => 'CRM_Core_BAO_UFGroup',
'localizable' => 0,
'add' => '1.7',
],
- 'cancel_URL' => [
- 'name' => 'cancel_URL',
+ 'cancel_url' => [
+ 'name' => 'cancel_url',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Profile Cancel URL'),
- 'description' => ts('Redirect to URL when Cancle button clik .'),
+ 'description' => ts('Redirect to URL when Cancel button clicked .'),
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'usage' => [
'duplicate_matching' => FALSE,
'token' => FALSE,
],
- 'where' => 'civicrm_uf_group.cancel_URL',
+ 'where' => 'civicrm_uf_group.cancel_url',
'table_name' => 'civicrm_uf_group',
'entity' => 'UFGroup',
'bao' => 'CRM_Core_BAO_UFGroup',
'localizable' => 0,
+ 'html' => [
+ 'label' => ts("Cancel URL"),
+ ],
'add' => '1.4',
],
'is_cms_user' => [
$this->assign('recentlyViewed', FALSE);
if ($this->_context !== 'dialog') {
- $this->_postURL = $this->_ufGroup['post_URL'];
- $this->_cancelURL = $this->_ufGroup['cancel_URL'];
+ $this->_postURL = $this->_ufGroup['post_url'];
+ $this->_cancelURL = $this->_ufGroup['cancel_url'];
$gidString = $this->_gid;
if (!empty($this->_profileIds)) {
// should we allow updates on a exisitng contact
$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')]);
// we do not have any url checks to allow relative urls
- $form->addElement('text', 'post_URL', ts('Redirect URL'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_UFGroup', 'post_URL'));
+ $form->addElement('text', 'post_url', ts('Redirect URL'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_UFGroup', 'post_url'));
$form->add('advcheckbox', 'add_cancel_button', ts('Include Cancel Button?'));
- $form->addElement('text', 'cancel_URL', ts('Cancel Redirect URL'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_UFGroup', 'cancel_URL'));
+ $form->addElement('text', 'cancel_url', ts('Cancel Redirect URL'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_UFGroup', 'cancel_url'));
// add select for groups
$group = ['' => ts('- select -')] + $form->_group;
$showAdvanced = 0;
$advFields = [
'group',
- 'post_URL',
- 'cancel_URL',
+ 'post_url',
+ 'cancel_url',
'add_captcha',
'is_map',
'is_uf_link',
{* file to handle db changes in 5.64.alpha1 during upgrade *}
+
+-- fix mis-casing of field name. Note the php function doesn't permit the name change hence it is here
+-- but field is not localised.
+ALTER TABLE civicrm_uf_group
+CHANGE `post_URL` `post_url` varchar(255) DEFAULT NULL COMMENT 'Redirect to URL on submit.',
+CHANGE `cancel_URL` `cancel_url` varchar(255) DEFAULT NULL COMMENT 'Redirect to URL when Cancel button clicked.'
+;
// Default to the logged in user.
$params['created_id']['api.default'] = 'user_contact_id';
$params['created_date']['api.default'] = 'now';
+ $params['post_url']['api.aliases'] = ['post_URL'];
+ $params['cancel_url']['api.aliases'] = ['cancel_URL'];
}
/**
'add_captcha' => 1,
'add_contact_to_group' => 1,
'group' => 1,
- 'cancel_URL' => 'http://example.org/cancel',
+ 'cancel_url' => 'http://example.org/cancel',
'created_date' => '2009-06-27 00:00:00',
'created_id' => 1,
'group_type' => 'Individual,Contact',
'is_update_dupe' => 1,
'name' => 'Test_Group',
'notify' => 'admin@example.org',
- 'post_URL' => 'http://example.org/post',
+ 'post_url' => 'http://example.org/post',
'title' => 'Test Group',
];
'help_pre' => 'help pre',
'help_post' => 'help post',
'limit_listings_group_id' => '1',
- 'post_URL' => 'http://example.org/post',
+ 'post_url' => 'http://example.org/post',
'add_to_group_id' => '1',
'add_captcha' => '1',
'is_map' => '1',
'is_edit_link' => '1',
'is_uf_link' => '1',
'is_update_dupe' => '1',
- 'cancel_URL' => 'http://example.org/cancel',
+ 'cancel_url' => 'http://example.org/cancel',
'is_cms_user' => '1',
'notify' => 'admin@example.org',
'is_reserved' => '1',
'help_pre' => 'help pre',
'help_post' => 'help post',
'limit_listings_group_id' => '1',
- 'post_URL' => 'http://example.org/post',
+ 'post_url' => 'http://example.org/post',
'add_to_group_id' => '1',
'add_captcha' => '1',
'is_map' => '1',
help: ts('Select a group if you want contacts to be automatically added to that group when the profile is submitted.'),
type: 'Number'
},
- 'cancel_URL': {
+ 'cancel_url': {
title: ts('Cancel Redirect URL'),
help: ts('If you are using this profile as a contact signup or edit form, and want to redirect the user to a static URL if they click the Cancel button - enter the complete URL here. If this field is left blank, the built-in Profile form will be redisplayed.'),
type: 'Text'
help: ts('If you want member(s) of your organization to receive a notification email whenever this Profile form is used to enter or update contact information, enter one or more email addresses here. Multiple email addresses should be separated by a comma (e.g. jane@example.org, paula@example.org). The first email address listed will be used as the FROM address in the notifications.'),
type: 'TextArea'
},
- 'post_URL': {
+ 'post_url': {
title: ts('Redirect URL'),
help: ts("If you are using this profile as a contact signup or edit form, and want to redirect the user to a static URL after they've submitted the form, you can also use contact tokens in URL - enter the complete URL here. If this field is left blank, the built-in Profile form will be redisplayed with a generic status message - 'Your contact information has been saved.'"),
type: 'Text'
<td>{$form.notify.html} {help id='id-notify_email' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
- <tr class="crm-uf-advancesetting-form-block-post_URL">
- <td class="label">{$form.post_URL.label}</td>
- <td>{$form.post_URL.html} {help id='id-post_URL' file="CRM/UF/Form/Group.hlp"}</td>
+ <tr class="crm-uf-advancesetting-form-block-post_url">
+ <td class="label">{$form.post_url.label}</td>
+ <td>{$form.post_url.html} {help id='id-post_url' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-add_cancel_button">
<td>{$form.add_cancel_button.html} {$form.add_cancel_button.label} {help id='id-add_cancel_button' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
- <tr class="cancel_button_section crm-uf-advancesetting-form-block-cancel_URL">
- <td class="label">{$form.cancel_URL.label}</td>
- <td>{$form.cancel_URL.html} {help id='id-cancel_URL' file="CRM/UF/Form/Group.hlp"}</td>
+ <tr class="cancel_button_section crm-uf-advancesetting-form-block-cancel_url">
+ <td class="label">{$form.cancel_url.label}</td>
+ <td>{$form.cancel_url.html} {help id='id-cancel_url' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
{foreach from=$advancedFieldsConverted item=fieldName}
{ts}If you want member(s) of your organization to receive a notification email whenever this Profile form is used to enter or update contact information, enter one or more email addresses here. Multiple email addresses should be separated by a comma (e.g. jane@example.org, paula@example.org). The first email address listed will be used as the FROM address in the notifications.{/ts}
{/htxt}
-{htxt id='id-post_URL-title'}
+{htxt id='id-post_url-title'}
{ts}Redirect{/ts}
{/htxt}
-{htxt id='id-post_URL'}
+{htxt id='id-post_url'}
{ts}If you are using this profile as a contact signup or edit form, and want to redirect the user to a static URL after they've submitted the form, you can also use contact tokens in URL - enter the complete URL here. If this field is left blank, the built-in Profile form will be redisplayed with a generic status message - 'Your contact information has been saved.'{/ts}
{/htxt}
{ts}Enable/Disable this checkbox to add/remove cancel button on the profile form.{/ts}
{/htxt}
-{htxt id='id-cancel_URL-title'}
+{htxt id='id-cancel_url-title'}
{ts}Cancel Redirect{/ts}
{/htxt}
-{htxt id='id-cancel_URL'}
+{htxt id='id-cancel_url'}
{ts}If you are using this profile as a contact signup or edit form, and want to redirect the user to a static URL if they click the Cancel button - enter the complete URL here. If this field is left blank, the built-in Profile form will be redisplayed.{/ts}
{/htxt}
'add_captcha' => 1,
'add_contact_to_group' => $this->_groupId,
'group' => $this->_groupId,
- 'cancel_URL' => 'http://example.org/cancel',
+ 'cancel_url' => 'http://example.org/cancel',
'created_date' => '2009-06-27 00:00:00',
'created_id' => $this->_contactId,
'group_type' => 'Individual,Contact',
'is_update_dupe' => 1,
'name' => 'Test_Group',
'notify' => 'admin@example.org',
- 'post_URL' => 'http://example.org/post',
+ 'post_url' => 'http://example.org/post',
'title' => 'Test Group',
];
}
'id' => $this->_ufGroupId,
'add_captcha' => 1,
'add_contact_to_group' => $this->_groupId,
- 'cancel_URL' => 'http://example.org/cancel',
+ 'cancel_url' => 'http://example.org/cancel',
'created_date' => '2009-06-27',
'created_id' => $this->_contactId,
'group' => $this->_groupId,
'is_update_dupe' => 1,
'name' => 'test_group',
'notify' => 'admin@example.org',
- 'post_URL' => 'http://example.org/post',
+ 'post_url' => 'http://example.org/post',
'title' => 'Test Group',
];
$result = $this->callAPISuccess('uf_group', 'create', $params);
<onDelete>SET NULL</onDelete>
</foreignKey>
<field>
- <name>post_URL</name>
+ <name>post_url</name>
<type>varchar</type>
<length>255</length>
- <comment>Redirect to URL.</comment>
+ <comment>Redirect to URL on submit.</comment>
<html>
<label>Post URL</label>
</html>
<add>1.7</add>
</field>
<field>
- <name>cancel_URL</name>
+ <name>cancel_url</name>
<title>Profile Cancel URL</title>
<type>varchar</type>
<length>255</length>
- <comment>Redirect to URL when Cancle button clik .</comment>
+ <comment>Redirect to URL when Cancel button clicked.</comment>
+ <html>
+ <label>Cancel URL</label>
+ </html>
<add>1.4</add>
</field>
<field>