From e5227b8dfb0e5292a133f17072144799738e272c Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 24 Jun 2016 22:12:59 +1200 Subject: [PATCH] CRM-17154 Update actions - save rather than update, no duplicate refresh, clear task on click (for csv) --- CRM/Report/BAO/ReportInstance.php | 3 +-- CRM/Report/Form.php | 5 ----- js/crm.searchForm.js | 1 + 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CRM/Report/BAO/ReportInstance.php b/CRM/Report/BAO/ReportInstance.php index df6b842076..0d2fc184f6 100644 --- a/CRM/Report/BAO/ReportInstance.php +++ b/CRM/Report/BAO/ReportInstance.php @@ -363,8 +363,7 @@ class CRM_Report_BAO_ReportInstance extends CRM_Report_DAO_ReportInstance { */ public static function getActionMetadata() { $actions = array( - 'report_instance.html' => array('title' => ts('View results')), - 'report_instance.save' => array('title' => ts('Update')), + 'report_instance.save' => array('title' => ts('Save')), 'report_instance.copy' => array( 'title' => ts('Save a Copy'), 'data' => array( diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index f3215dd9e6..e3f7c7857f 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -1520,8 +1520,6 @@ class CRM_Report_Form extends CRM_Core_Form { $actions['report_instance.save']['title'] = ts('Create Report'); } - $actions['report_instance.html']['title'] = $this->getResultsLabel(); - if (!$this->_csvSupported) { unset($actions['report_instance.csv']); } @@ -4648,9 +4646,6 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']} ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_address']}.contact_id) AND {$this->_aliases['civicrm_address']}.is_primary = 1\n"; - if ($buttonName == $this->_createNewButtonName) { - $this->_outputMode = 'copy'; - } } } diff --git a/js/crm.searchForm.js b/js/crm.searchForm.js index 2e2a6cd492..785ae15afe 100644 --- a/js/crm.searchForm.js +++ b/js/crm.searchForm.js @@ -172,6 +172,7 @@ } else if (!$(this).find(':selected').data('supports_modal')) { $go.click(); + $('#task').val('').select2('val', ''); } // The following code can load the task in a popup, however not all tasks function correctly with this // So it's a per-task opt-in mechanism. -- 2.25.1