X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FPCP%2FForm%2FContribute.php;h=65e4e53734362245fd4f911a8403673d41454a61;hb=4c12c9b771bde931077f56685b632bd34504b238;hp=0df50d4ffd1e5f3919147879a1f27fb829fde86c;hpb=a335f6b228626e3e1b2f1549c8ddcbb9232b3c6b;p=civicrm-core.git diff --git a/CRM/PCP/Form/Contribute.php b/CRM/PCP/Form/Contribute.php index 0df50d4ffd..65e4e53734 100644 --- a/CRM/PCP/Form/Contribute.php +++ b/CRM/PCP/Form/Contribute.php @@ -1,7 +1,7 @@ _id, 'cc_receipt')) { $defaults['notify_email'] = $ccReceipt; @@ -85,12 +84,12 @@ class CRM_PCP_Form_Contribute extends CRM_Contribute_Form_ContributionPage { } /** - * Build the form object + * Build the form object. * * @return void - * @access public */ public function buildQuickForm() { + $this->_last = TRUE; CRM_PCP_BAO_PCP::buildPCPForm($this); $this->addElement('checkbox', 'pcp_active', ts('Enable Personal Campaign Pages? (for this contribution page)'), NULL, array('onclick' => "return showHideByValue('pcp_active',true,'pcpFields','table-row','radio',false);")); @@ -100,16 +99,16 @@ class CRM_PCP_Form_Contribute extends CRM_Contribute_Form_ContributionPage { } /** - * Validation + * Validation. * - * @param array $params (ref.) an assoc array of name/value pairs + * @param array $params + * (ref.) an assoc array of name/value pairs. * * @param $files * @param $self * - * @return mixed true or array of errors - * @access public - * @static + * @return bool|array + * mixed true or array of errors */ public static function formRule($params, $files, $self) { $errors = array(); @@ -142,9 +141,8 @@ class CRM_PCP_Form_Contribute extends CRM_Contribute_Form_ContributionPage { } /** - * Process the form submission + * Process the form submission. * - * @access public * * @return void */ @@ -160,9 +158,9 @@ class CRM_PCP_Form_Contribute extends CRM_Contribute_Form_ContributionPage { $params['target_entity_type'] = CRM_Utils_Array::value('target_entity_type', $params, 'contribute'); $params['target_entity_id'] = $this->_id; - $dao = new CRM_PCP_DAO_PCPBlock(); + $dao = new CRM_PCP_DAO_PCPBlock(); $dao->entity_table = $params['entity_table']; - $dao->entity_id = $this->_id; + $dao->entity_id = $this->_id; $dao->find(TRUE); $params['id'] = $dao->id; $params['is_active'] = CRM_Utils_Array::value('pcp_active', $params, FALSE); @@ -178,10 +176,9 @@ class CRM_PCP_Form_Contribute extends CRM_Contribute_Form_ContributionPage { * Return a descriptive name for the page, used in wizard header * * @return string - * @access public */ public function getTitle() { return ts('Enable Personal Campaign Pages'); } -} +}