Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add help text to payment processor subject field #15590

Merged
merged 1 commit into from
Oct 25, 2019

Conversation

alifrumin
Copy link
Contributor

@alifrumin alifrumin commented Oct 23, 2019

Overview

Improves consistency by adding a help icon to the subject field on the "Settings - Payment Processor" form (CiviCRM Admin bar -> Adminster -> System Settings -> Payment Processors add or edit a payment processor).

NOTE: None of the processors that ship with core use a subject field, but the template for the field lives in core and other payment processors rely on it including:

The labels for the subject field vary from payment processor to payment processor depending on how the 'subject_label' is defined in the metadata but the field template is the same.

Before

No blue help icon next to the subject field on the "Settings - Payment Processor" form.

In this example (a site with https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor installed and the Payment Processor Type "Omnipay - Paybox System" selected) the subject field has the label "Rang":
rang

After

With this change a blue help icon appears next to the subject field on the "Settings - Payment Processor" form. Payment processor developers can populate the help text with a templates/CRM/Admin/Page/PaymentProcessor.extra.hlp file like this

Example: Site with TSYS processor set up where the Subject label is "Merchant Site ID" a blue help icon shows up next to it.
merchantSite

@civibot
Copy link

civibot bot commented Oct 23, 2019

(Standard links)

@civibot civibot bot added the master label Oct 23, 2019
@demeritcowboy
Copy link
Contributor

Hi @alifrumin I can review and it seems straightforward just wondering if you've already tested what happens when two payment processors include a templates/CRM/Admin/Page/PaymentProcessor.extra.hlp file? I hope they fight and it's messy because that's way more fun.

@mattwire
Copy link
Contributor

@alifrumin Be nice if this was documented somewhere in the dev docs? Change itself is consistent with other lines in the template.

@mattwire mattwire merged commit 6b5dfd1 into civicrm:master Oct 25, 2019
@alifrumin
Copy link
Contributor Author

alifrumin commented Oct 25, 2019

@demeritcowboy I just tested installing two payment processors each with a different templates/CRM/Admin/Page/PaymentProcessor.extra.hlp and they do fight! so a PaymentProcessor.extra.hlp is not the best way to handle this, good catch. I switched to adding a template file with a unique name to 'CRM_Admin_Form_PaymentProcessor' using a buildForm hook and that worked (and will play nicely with others). This pr is still instrumental in making that work. Thank you @mattwire for merging I submitted a pr to update the documentation regarding how to add help text for these fields -> civicrm/civicrm-dev-docs#721

@homotechsual
Copy link
Contributor

Label as needs-docs please - docs PR is not merge-ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants