From ac3302a291c640755762e981d6340f7b67ba2d04 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Mon, 25 Sep 2023 15:30:28 -0400 Subject: [PATCH] place_holder only ever defined in one place --- CRM/Core/Form/EntityFormTrait.php | 1 - CRM/Member/Form/MembershipType.php | 5 +++-- templates/CRM/Core/Form/Field.tpl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Core/Form/EntityFormTrait.php b/CRM/Core/Form/EntityFormTrait.php index bafa4d7479..3941da88d6 100644 --- a/CRM/Core/Form/EntityFormTrait.php +++ b/CRM/Core/Form/EntityFormTrait.php @@ -179,7 +179,6 @@ trait CRM_Core_Form_EntityFormTrait { 'post_html_text' => '', 'description' => '', 'documentation_link' => ['page' => '', 'resource' => ''], - 'place_holder' => '', ], $fields); } $this->assign('entityFields', $this->entityFields); diff --git a/CRM/Member/Form/MembershipType.php b/CRM/Member/Form/MembershipType.php index 9dc8251cc0..9781f19319 100644 --- a/CRM/Member/Form/MembershipType.php +++ b/CRM/Member/Form/MembershipType.php @@ -53,7 +53,8 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form_MembershipConfig { 'auto_renew' => [ 'name' => 'auto_renew', 'options' => CRM_Core_SelectValues::memberAutoRenew(), - 'place_holder' => ts('You will need to select and configure a supported payment processor (currently Authorize.Net, PayPal Pro, or PayPal Website Standard) in order to offer automatically renewing memberships.'), + // Note this doesn't get used currently because the template has its own code for this field. Note also the documentation link that you see in the template is added later here down below. + 'description' => ts('You will need to select and configure a supported payment processor (currently Authorize.Net, PayPal Pro, or PayPal Website Standard) in order to offer automatically renewing memberships.'), ], 'duration_interval' => [ 'name' => 'duration_interval', @@ -99,7 +100,7 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form_MembershipConfig { if (!CRM_Financial_BAO_PaymentProcessor::hasPaymentProcessorSupporting(['Recurring'])) { $this->entityFields['auto_renew']['not-auto-addable'] = TRUE; - $this->entityFields['auto_renew']['documentation_link'] = ['page' => 'user/contributions/payment-processors']; + $this->entityFields['auto_renew']['documentation_link'] = ['page' => 'user/contributions/payment-processors', 'resource' => '']; } } diff --git a/templates/CRM/Core/Form/Field.tpl b/templates/CRM/Core/Form/Field.tpl index a502b4eb99..4666f624a3 100644 --- a/templates/CRM/Core/Form/Field.tpl +++ b/templates/CRM/Core/Form/Field.tpl @@ -15,7 +15,7 @@ {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} - {if $form.$fieldName.html}{$form.$fieldName.html}{else}{$fieldSpec.place_holder}{/if}{if array_key_exists('post_html_text', $fieldSpec) && $fieldSpec.post_html_text}{$fieldSpec.post_html_text}{/if}
+ {if $form.$fieldName.html}{$form.$fieldName.html}{/if}{if array_key_exists('post_html_text', $fieldSpec) && $fieldSpec.post_html_text}{$fieldSpec.post_html_text}{/if}
{if array_key_exists('description', $fieldSpec) && $fieldSpec.description}{$fieldSpec.description}{/if} {if array_key_exists('documentation_link', $fieldSpec) && $fieldSpec.documentation_link.page}{docURL page=$fieldSpec.documentation_link.page resource=$fieldSpec.documentation_link.resource}{/if} -- 2.25.1