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

REF use addRadio function to add in the radio fields to these forms #19265

Merged
merged 1 commit into from
Dec 23, 2020

Conversation

seamuslee001
Copy link
Contributor

Overview

This refactors these 2 forms to use the addRadio function in CRM_Core_Form rather than manually creating radio elements then adding them to a group

Before

Using non centralised code

After

Using a centralised function

ping @demeritcowboy @eileenmcnaughton

@civibot
Copy link

civibot bot commented Dec 23, 2020

(Standard links)

$exportOptions[self::EXPORT_MERGE_SAME_ADDRESS] = ts('Merge All Contacts with the Same Address');
$exportOptions[self::EXPORT_MERGE_HOUSEHOLD] = ts('Merge Household Members into their Households');
foreach (array_keys($exportOptions) as $key) {
$exportOptionsJS[$key] = ['onClick' => 'showMappingOption( );'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these should be showGreetingOptions() right? Also I get Error: Call to a member function getName() on string in HTML_QuickForm_group->onQuickFormEvent()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah good point thanks for that pick up

@eileenmcnaughton
Copy link
Contributor

This is good to merge once @demeritcowboy is happy with it

@seamuslee001
Copy link
Contributor Author

@demeritcowboy thanks for that pickup should be sorted now mate

@demeritcowboy
Copy link
Contributor

Looks good to me.

@seamuslee001 seamuslee001 merged commit e4d5b55 into civicrm:master Dec 23, 2020
@seamuslee001 seamuslee001 deleted the use_add_radio branch December 23, 2020 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants