Fix notice on Membership Component Settings page
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 13 Sep 2023 02:51:14 +0000 (14:51 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 13 Sep 2023 02:59:36 +0000 (14:59 +1200)
templates/CRM/Core/Form/Field.tpl

index e9237ff4508c4b08b72ff43200734c5774d845ab..97a111ecb9792b6aed2e77cda4e4f6b04e4fb1e5 100644 (file)
@@ -7,16 +7,16 @@
  | and copyright information, see https://civicrm.org/licensing       |
  +--------------------------------------------------------------------+
 *}
-{if $fieldSpec.template}
+{if array_key_exists('template', $fieldSpec)}
   {include file=$fieldSpec.template}
 {else}
   <td class="label">{$form.$fieldName.label}
-    {if $fieldSpec.help.id}{help id=$fieldSpec.help.id file=$fieldSpec.help.file}{/if}
+    {if array_key_exists('help', $fieldSpec) && $fieldSpec.help.id}{help id=$fieldSpec.help.id file=$fieldSpec.help.file}{/if}
     {if $action == 2 && array_key_exists('is_add_translate_dialog', $fieldSpec)}{include file='CRM/Core/I18n/Dialog.tpl' table=$entityTable field=$fieldName id=$entityID}{/if}
   </td>
   <td>
-    {if $fieldSpec.pre_html_text}{$fieldSpec.pre_html_text}{/if}{if $form.$fieldName.html}{$form.$fieldName.html}{else}{$fieldSpec.place_holder}{/if}{if $fieldSpec.post_html_text}{$fieldSpec.post_html_text}{/if}<br />
-    {if $fieldSpec.description}<span class="description">{$fieldSpec.description}</span>{/if}
-    {if $fieldSpec.documentation_link.page}{docURL page=$fieldSpec.documentation_link.page resource=$fieldSpec.documentation_link.resource}{/if}
+    {if array_key_exists('pre_html_text', $fieldSpec)}{$fieldSpec.pre_html_text}{/if}{if $form.$fieldName.html}{$form.$fieldName.html}{else}{$fieldSpec.place_holder}{/if}{if array_key_exists('post_html_text', $fieldSpec)}{$fieldSpec.post_html_text}{/if}<br />
+    {if array_key_exists('descrition', $fieldSpec)}<span class="description">{$fieldSpec.description}</span>{/if}
+    {if array_key_exists('documentation_link.page', $fieldSpec)}{docURL page=$fieldSpec.documentation_link.page resource=$fieldSpec.documentation_link.resource}{/if}
   </td>
 {/if}