*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for processing a Contribution
- *
+ * This class generates form components for processing a Contribution.
*/
class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_ContributionBase {
/**
* Set variables up before form is built.
- *
- * @return void
*/
public function preProcess() {
parent::preProcess();
$this->assign('isShare', CRM_Utils_Array::value('is_share', $this->_values));
$this->assign('isConfirmEnabled', CRM_Utils_Array::value('is_confirm_enabled', $this->_values));
- // make sure we have right permission to edit this user
- $csContactID = $this->getContactID();
- $reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
- $mainDisplay = CRM_Utils_Request::retrieve('_qf_Main_display', 'Boolean', CRM_Core_DAO::$_nullObject);
-
- if ($reset) {
- $this->assign('reset', $reset);
- }
-
- if ($mainDisplay) {
- $this->assign('mainDisplay', $mainDisplay);
- }
+ $this->assign('reset', CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject));
+ $this->assign('mainDisplay', CRM_Utils_Request::retrieve('_qf_Main_display', 'Boolean',
+ CRM_Core_DAO::$_nullObject));
// Possible values for 'is_for_organization':
// * 0 - org profile disabled
/**
* Set the default values.
- *
- * @return void
- */
- /**
*/
public function setDefaultValues() {
// check if the user is registered and we have a contact ID
//build set default for pledge overdue payment.
if (!empty($this->_values['pledge_id'])) {
- //get all pledge payment records of current pledge id.
- $pledgePayments = array();
-
//used to record completed pledge payment ids used later for honor default
$completedContributionIds = array();
-
$pledgePayments = CRM_Pledge_BAO_PledgePayment::getPledgePayments($this->_values['pledge_id']);
$duePayment = FALSE;
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
// build profiles first so that we can determine address fields etc
}
}
- $contactID = $this->getContactID();
if ($this->getContactID() === '0') {
$this->addCidZeroOptions($onlinePaymentProcessorEnabled);
}
* The input form values.
* @param array $files
* The uploaded files if any.
- * @param $self
+ * @param CRM_Core_Form $self
*
* @return bool|array
* true if no errors, else array of errors
/**
* Process the form submission.
- *
- *
- * @return void
*/
public function postProcess() {
$config = CRM_Core_Config::singleton();