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] remove obsolete code. #15515

Merged
merged 1 commit into from
Oct 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions CRM/Event/Form/Registration/AdditionalParticipant.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,32 +180,6 @@ public function buildQuickForm() {
if ($this->_values['event']['is_monetary']) {
CRM_Event_Form_Registration_Register::buildAmount($this);
}
$first_name = $last_name = NULL;
$pre = $post = [];
foreach ([
'pre',
'post',
] as $keys) {
if (isset($this->_values['additional_custom_' . $keys . '_id'])) {
$this->buildCustom($this->_values['additional_custom_' . $keys . '_id'], 'additionalCustom' . ucfirst($keys));
Copy link
Contributor

Choose a reason for hiding this comment

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

seems like this is required to load profiles for additional participants? Currently, no fields are displayed on the page.

image

Copy link
Contributor

Choose a reason for hiding this comment

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

Have requested a PR here #15698. Seems like only this line is required ?

$$keys = CRM_Core_BAO_UFGroup::getFields($this->_values['additional_custom_' . $keys . '_id']);
}
foreach ([
'first_name',
'last_name',
] as $name) {
if (array_key_exists($name, $$keys) &&
CRM_Utils_Array::value('is_required', CRM_Utils_Array::value($name, $$keys))
) {
$$name = 1;
}
}
}

$required = ($button == 'skip' ||
$this->_values['event']['allow_same_participant_emails'] == 1 &&
($first_name && $last_name)
) ? FALSE : TRUE;

//add buttons
$js = NULL;
Expand Down