X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCampaign%2FForm%2FSurvey.php;h=05eec10ceee63cc18d5fc6145bad5e53f3e3a8a3;hb=9585cabb995de30da705ab3349d15f048f128ab4;hp=981514751aba2bd8e05f6547e34a678d989d82f0;hpb=5c22567ff39bf585b2da7920620666f4aef2cc92;p=civicrm-core.git diff --git a/CRM/Campaign/Form/Survey.php b/CRM/Campaign/Form/Survey.php index 981514751a..05eec10cee 100644 --- a/CRM/Campaign/Form/Survey.php +++ b/CRM/Campaign/Form/Survey.php @@ -84,11 +84,11 @@ class CRM_Campaign_Form_Survey extends CRM_Core_Form { if ($this->_surveyId) { $this->_single = TRUE; - $params = array('id' => $this->_surveyId); + $params = ['id' => $this->_surveyId]; CRM_Campaign_BAO_Survey::retrieve($params, $surveyInfo); $this->_surveyTitle = $surveyInfo['title']; $this->assign('surveyTitle', $this->_surveyTitle); - CRM_Utils_System::setTitle(ts('Configure Survey - %1', array(1 => $this->_surveyTitle))); + CRM_Utils_System::setTitle(ts('Configure Survey - %1', [1 => $this->_surveyTitle])); } $this->assign('action', $this->_action); @@ -100,7 +100,7 @@ class CRM_Campaign_Form_Survey extends CRM_Core_Form { // CRM-11480, CRM-11682 // Preload libraries required by the "Questions" tab CRM_UF_Page_ProfileEditor::registerProfileScripts(); - CRM_UF_Page_ProfileEditor::registerSchemas(array('IndividualModel', 'ActivityModel')); + CRM_UF_Page_ProfileEditor::registerSchemas(['IndividualModel', 'ActivityModel']); CRM_Campaign_Form_Survey_TabHeader::build($this); } @@ -111,39 +111,39 @@ class CRM_Campaign_Form_Survey extends CRM_Core_Form { public function buildQuickForm() { $session = CRM_Core_Session::singleton(); if ($this->_surveyId) { - $buttons = array( - array( + $buttons = [ + [ 'type' => 'upload', 'name' => ts('Save'), 'isDefault' => TRUE, - ), - array( + ], + [ 'type' => 'upload', 'name' => ts('Save and Done'), 'subName' => 'done', - ), - array( + ], + [ 'type' => 'upload', 'name' => ts('Save and Next'), 'spacing' => '                 ', 'subName' => 'next', - ), - ); + ], + ]; } else { - $buttons = array( - array( + $buttons = [ + [ 'type' => 'upload', 'name' => ts('Continue'), 'spacing' => '                 ', 'isDefault' => TRUE, - ), - ); + ], + ]; } - $buttons[] = array( + $buttons[] = [ 'type' => 'cancel', 'name' => ts('Cancel'), - ); + ]; $this->addButtons($buttons); $url = CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=survey'); @@ -158,7 +158,7 @@ class CRM_Campaign_Form_Survey extends CRM_Core_Form { $tabTitle = 'Main settings'; } $subPage = strtolower($className); - CRM_Core_Session::setStatus(ts("'%1' have been saved.", array(1 => $tabTitle)), ts('Saved'), 'success'); + CRM_Core_Session::setStatus(ts("'%1' have been saved.", [1 => $tabTitle]), ts('Saved'), 'success'); $this->postProcessHook();