diff --git a/CRM/Admin/Form/SettingTrait.php b/CRM/Admin/Form/SettingTrait.php index 15de133812d0..03aa91fc62a4 100644 --- a/CRM/Admin/Form/SettingTrait.php +++ b/CRM/Admin/Form/SettingTrait.php @@ -143,11 +143,6 @@ protected function addFieldsDefinedInSettingsMetadata() { $this->includesReadOnlyFields = TRUE; } - if (isset($props['help_link'])) { - // Set both the value in this loop & the outer value as we assign both to the template while we deprecate the $descriptions assignment. - $settingMetaData[$setting]['description'] = $props['description'] .= ' ' . CRM_Utils_System::docURL2($props['help_link']['page'], NULL, NULL, NULL, NULL, $props['help_link']['resource']); - - } $add = 'add' . $quickFormType; if ($add == 'addElement') { $this->$add( @@ -162,7 +157,7 @@ protected function addFieldsDefinedInSettingsMetadata() { $this->addElement('select', $setting, ts($props['title']), $options, CRM_Utils_Array::value('html_attributes', $props)); } elseif ($add == 'addCheckBox') { - $this->addCheckBox($setting, ts($props['title']), $options, NULL, CRM_Utils_Array::value('html_attributes', $props), NULL, NULL, ['  ']); + $this->addCheckBox($setting, '', $options, NULL, CRM_Utils_Array::value('html_attributes', $props), NULL, NULL, ['  ']); } elseif ($add == 'addCheckBoxes') { $options = array_flip($options); diff --git a/settings/Contribute.setting.php b/settings/Contribute.setting.php index 22bdd134fd09..213271e2a3fb 100644 --- a/settings/Contribute.setting.php +++ b/settings/Contribute.setting.php @@ -101,6 +101,7 @@ 'is_contact' => 0, 'description' => NULL, 'help_text' => NULL, + 'help' => ['id' => 'acl_financial_type'], ), 'deferred_revenue_enabled' => array( 'group_name' => 'Contribute Preferences', diff --git a/settings/Event.setting.php b/settings/Event.setting.php index 70d0ddb76769..e9ce8749f46e 100644 --- a/settings/Event.setting.php +++ b/settings/Event.setting.php @@ -48,7 +48,7 @@ 'is_contact' => 0, 'description' => ts('This feature allows users to register for more than one event at a time. When enabled, users will add event(s) to a "cart" and then pay for them all at once. Enabling this setting will affect online registration for all active events. The code is an alpha state, and you will potentially need to have developer resources to debug and fix sections of the codebase while testing and deploying it'), 'help_text' => '', - 'help_link' => ['page' => 'CiviEvent Cart Checkout', 'resource' => 'wiki'], + 'documentation_link' => ['page' => 'CiviEvent Cart Checkout', 'resource' => 'wiki'], ), 'show_events' => array( 'name' => 'show_events', diff --git a/settings/Multisite.setting.php b/settings/Multisite.setting.php index c7c6bfb04db6..a6b287a78943 100644 --- a/settings/Multisite.setting.php +++ b/settings/Multisite.setting.php @@ -48,7 +48,7 @@ 'is_domain' => 1, 'is_contact' => 0, 'description' => ts('Make CiviCRM aware of multiple domains. You should configure a domain group if enabled'), - 'help_link' => ['page' => 'Multi Site Installation', 'resource' => 'wiki'], + 'documentation_link' => ['page' => 'Multi Site Installation', 'resource' => 'wiki'], 'help_text' => NULL, ), 'domain_group_id' => array( diff --git a/templates/CRM/Core/Form/Field.tpl b/templates/CRM/Core/Form/Field.tpl index 026a009d1a35..fb6a01eee9a0 100644 --- a/templates/CRM/Core/Form/Field.tpl +++ b/templates/CRM/Core/Form/Field.tpl @@ -35,6 +35,6 @@ {if $form.$fieldName.html}{if $fieldSpec.formatter === 'crmMoney'}{$form.$fieldName.html|crmMoney}{else}{$form.$fieldName.html}{/if}{else}{$fieldSpec.place_holder}{/if}
{if $fieldSpec.description}{$fieldSpec.description}{/if} - {if $fieldSpec.documentation_link}{docURL page=$fieldSpec.documentation_link.page}{/if} + {if $fieldSpec.documentation_link}{docURL page=$fieldSpec.documentation_link.page resource=$fieldSpec.documentation_link.resource}{/if} {/if} diff --git a/templates/CRM/Form/basicFormFields.tpl b/templates/CRM/Form/basicFormFields.tpl index 8dc9f6fe99fb..93725f14c098 100644 --- a/templates/CRM/Form/basicFormFields.tpl +++ b/templates/CRM/Form/basicFormFields.tpl @@ -25,28 +25,11 @@ *} {* @todo with a small amount of tinkering most of this can be replaced by re-using the foreach loop in CRM_Core_EntityForm.tpl *} - {foreach from=$fields item=field key=fieldName} - {assign var=n value=$fieldName} - {if $form.$n} - - {if $field.html_type EQ 'checkbox'|| $field.html_type EQ 'checkboxes'} - - - {else} - - - {/if} - - {/if} + + {foreach from=$fields item=fieldSpec} + {assign var=fieldName value=$fieldSpec.name} + + {include file="CRM/Core/Form/Field.tpl"} + {/foreach}
- {$form.$n.html} - {if $field.description} -
{$field.description} - {/if} -
{$form.$n.label} - {$form.$n.html} - {if $field.description} -
{$field.description} - {/if} -