diff --git a/CRM/Activity/Form/Activity.php b/CRM/Activity/Form/Activity.php index 24044465c56f..0882ebe9a222 100644 --- a/CRM/Activity/Form/Activity.php +++ b/CRM/Activity/Form/Activity.php @@ -797,25 +797,18 @@ public function buildQuickForm() { // form should be frozen for view mode $this->freeze(); - $buttons = array(); - $buttons[] = array( + $this->addButtons(array( 'type' => 'cancel', 'name' => ts('Done'), - ); - $this->addButtons($buttons); + )); } else { - $message = array( - 'completed' => ts('Are you sure? This is a COMPLETED activity with the DATE in the FUTURE. Click Cancel to change the date / status. Otherwise, click OK to save.'), - 'scheduled' => ts('Are you sure? This is a SCHEDULED activity with the DATE in the PAST. Click Cancel to change the date / status. Otherwise, click OK to save.'), - ); - $js = array('onclick' => "return activityStatus(" . json_encode($message) . ");"); $this->addButtons(array( array( 'type' => 'upload', 'name' => ts('Save'), - 'js' => $js, 'isDefault' => TRUE, + 'submitOnce' => TRUE, ), array( 'type' => 'cancel', diff --git a/templates/CRM/Activity/Form/Activity.tpl b/templates/CRM/Activity/Form/Activity.tpl index 6973e09378af..7e850e77a475 100644 --- a/templates/CRM/Activity/Form/Activity.tpl +++ b/templates/CRM/Activity/Form/Activity.tpl @@ -32,8 +32,6 @@ {/if}