CRM-17154 Update actions - save rather than update, no duplicate refresh, clear task...
authoreileen <emcnaughton@wikimedia.org>
Fri, 24 Jun 2016 10:12:59 +0000 (22:12 +1200)
committereileen <emcnaughton@wikimedia.org>
Sat, 25 Jun 2016 01:02:10 +0000 (13:02 +1200)
CRM/Report/BAO/ReportInstance.php
CRM/Report/Form.php
js/crm.searchForm.js

index df6b842076e6e60bf91ff482935b6838e1a8de4a..0d2fc184f6727485567e31d5588f5c7ac39e4e50 100644 (file)
@@ -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(
index f3215dd9e6d99d26e96c7465470dc7695bb1d913..e3f7c7857f2171fc24ef1780e76147afbfa4db69 100644 (file)
@@ -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';
-      }
     }
   }
 
index 2e2a6cd49238ad287464657c23ebe9a231c4f4f3..785ae15afe4e2721548bb1fb8567f057ce960614 100644 (file)
         }
         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.