From f0050a477ed4f629346d2df529682f74812cf941 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Sun, 9 Aug 2020 01:07:57 -0400 Subject: [PATCH] comments about hidden but still used buttons --- CRM/Case/Form/CaseView.php | 6 ++++++ templates/CRM/Case/Form/CaseView.tpl | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CRM/Case/Form/CaseView.php b/CRM/Case/Form/CaseView.php index 4c21b837e1..f2300dadb2 100644 --- a/CRM/Case/Form/CaseView.php +++ b/CRM/Case/Form/CaseView.php @@ -272,6 +272,9 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form { ['class' => 'crm-select2 crm-action-menu fa-list-ol'] ); } + // This button is hidden but gets clicked by javascript at + // https://github.com/civicrm/civicrm-core/blob/bd28ecf8121a85bc069cad3ab912a0c3dff8fdc5/templates/CRM/Case/Form/CaseView.js#L194 + // by the onChange handler for the above timeline_id select. $this->addElement('xbutton', $this->getButtonName('next'), ' ', [ 'class' => 'hiddenElement', 'type' => 'submit', @@ -520,6 +523,9 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form { FALSE, ['class' => 'crm-select2 huge'] ); + // This button is hidden but gets clicked by javascript at + // https://github.com/civicrm/civicrm-core/blob/bd28ecf8121a85bc069cad3ab912a0c3dff8fdc5/templates/CRM/Case/Form/CaseView.js#L55 + // when the mergeCasesDialog is saved. $this->addElement('xbutton', $this->getButtonName('next', 'merge_case'), ts('Merge'), diff --git a/templates/CRM/Case/Form/CaseView.tpl b/templates/CRM/Case/Form/CaseView.tpl index 86e23f57af..1301ac5b36 100644 --- a/templates/CRM/Case/Form/CaseView.tpl +++ b/templates/CRM/Case/Form/CaseView.tpl @@ -95,7 +95,7 @@

{$form.add_activity_type_id.html} {if $hasAccessToAllCases}   - {$form.timeline_id.html}{$form._qf_CaseView_next.html}   + {$form.timeline_id.html}{*This CaseView_next button is hidden, but gets clicked by the onChange handler for timeline_id in CaseView.js*}{$form._qf_CaseView_next.html}   {$form.report_id.html} {/if}

@@ -112,7 +112,7 @@ {if $mergeCases} {ts}Merge Case{/ts} - {$form._qf_CaseView_next_merge_case.html} + {*This CaseView_next_merge_case button is hidden, but gets clicked by javascript in CaseView.js when the mergeCasesDialog popup is saved.*}{$form._qf_CaseView_next_merge_case.html} {$form.merge_case_id.html} -- 2.25.1