return;
}
- // Legacy support for old-style $params['text']
- // TODO: This is probably no longer used, so remove
- $help = '';
- if (isset($params['text'])) {
- $help = '<div class="crm-help">' . $params['text'] . '</div>';
- }
-
if (empty($params['file']) && isset($smarty->_tpl_vars['tplFile'])) {
$params['file'] = $smarty->_tpl_vars['tplFile'];
}
--- /dev/null
+{*
+ +--------------------------------------------------------------------+
+ | CiviCRM version 4.3 |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2010 |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM. |
+ | |
+ | CiviCRM is free software; you can copy, modify, and distribute it |
+ | under the terms of the GNU Affero General Public License |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+ | |
+ | CiviCRM is distributed in the hope that it will be useful, but |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+ | See the GNU Affero General Public License for more details. |
+ | |
+ | You should have received a copy of the GNU Affero General Public |
+ | License and the CiviCRM Licensing Exception along |
+ | with this program; if not, contact CiviCRM LLC |
+ | at info[AT]civicrm[DOT]org. If you have questions about the |
+ | GNU Affero General Public License or the licensing of CiviCRM, |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
+*}
+{* Dynamically fetch the help text for a custom field *}
+{htxt id=$id}
+ {crmAPI var='result' entity='CustomField' action='getsingle' sequential=1 id=$id}
+ {$result.help_post}
+{/htxt}
+--------------------------------------------------------------------+
*}
{assign var="element_name" value=$element.element_name}
-{if $element.help_post}
- {assign var="help_post" value=$element.help_post}
-{/if}
{if $element.help_pre}
<tr class="custom_field-help-pre-row {$element.element_name}-row-help-pre">
{/if}
{if $element.options_per_line != 0 }
<tr class="custom_field-row {$element.element_name}-row">
- <td class="label">{$form.$element_name.label}{if $element.help_post}{help id=$element_name text=$help_post}{/if}</td>
+ <td class="label">{$form.$element_name.label}{if $element.help_post}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$form.$element_name.label}{/if}</td>
<td class="html-adjust">
{assign var="count" value="1"}
<table class="form-layout-compressed" style="margin-top: -0.5em;">
{else}
<tr class="custom_field-row {$element.element_name}-row">
- <td class="label">{$form.$element_name.label}{if $element.help_post}{help id=$element_name text=$help_post}{/if}</td>
+ <td class="label">{$form.$element_name.label}{if $element.help_post}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$form.$element_name.label}{/if}</td>
<td class="html-adjust">
{if $element.data_type neq 'Date' OR ($element.data_type eq 'Date' AND $element.is_view eq 1)}
{$form.$element_name.html}
{*assign var="element_name" value=$element.custom_group_id|cat:_|cat:$field_id|cat:_|cat:$element.name*}
{assign var="element_name" value=$element.element_name}
<tr>
- <td class="label">{$form.$element_name.label}{if $element.help_post}{help id=$element_name text=$element.help_post}{/if}</td>
+ <td class="label">{$form.$element_name.label}{if $element.help_post}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$form.$element_name.label}{/if}</td>
<td>
{assign var="count" value="1"}
<table class="form-layout-compressed">
{*assign var="element_name" value=$group_id|cat:_|cat:$field_id|cat:_|cat:$element.name*}
{assign var="element_name" value=$element.element_name}
<tr>
- <td class="label">{$form.$element_name.label}{if $element.help_post}{help id=$element_name text=$element.help_post}{/if}</td>
+ <td class="label">{$form.$element_name.label}{if $element.help_post}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$form.$element_name.label}{/if}</td>
<td>
{if $element.data_type neq 'Date'}
{$form.$element_name.html}