+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
protected $_cc = NULL;
/**
- * Set variables up before form is built
+ * Set variables up before form is built.
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_participantId = CRM_Utils_Request::retrieve('participantId', 'Positive', $this);
}
/**
- * Build the form object
+ * Build the form object.
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$params = array('id' => $this->_eventId);
$statusMsg = NULL;
if (array_key_exists($this->_participantStatusId,
- CRM_Event_PseudoConstant::participantStatus(NULL, "class = 'Pending'")
- )) {
-
+ CRM_Event_PseudoConstant::participantStatus(NULL, "class = 'Pending'")
+ )) {
//need to confirm that though participant confirming
//registration - but is there enough space to confirm.
- $emptySeats = CRM_Event_BAO_Participant::pendingToConfirmSpaces($this->_eventId);
+ $emptySeats = CRM_Event_BAO_Participant::pendingToConfirmSpaces($this->_eventId);
$additonalIds = CRM_Event_BAO_Participant::getAdditionalParticipantIds($this->_participantId);
$requireSpace = 1 + count($additonalIds);
if ($emptySeats !== NULL && ($requireSpace > $emptySeats)) {
else {
if ($this->_cc == 'fail') {
$statusMsg = '<div class="bold">' . ts('Your Credit Card transaction was not successful. No money has yet been charged to your card.') . '</div><div><br />' . ts('Click the "Confirm Registration" button to complete your registration in %1, or click "Cancel Registration" if you are no longer interested in attending this event.', array(
- 1 => $values['title'])) . '</div>';
+ 1 => $values['title'],
+ )) . '</div>';
}
else {
$statusMsg = '<div class="bold">' . ts('Confirm your registration for %1.', array(
- 1 => $values['title'])) . '</div><div><br />' . ts('Click the "Confirm Registration" button to begin, or click "Cancel Registration" if you are no longer interested in attending this event.') . '</div>';
+ 1 => $values['title'],
+ )) . '</div><div><br />' . ts('Click the "Confirm Registration" button to begin, or click "Cancel Registration" if you are no longer interested in attending this event.') . '</div>';
}
$buttons = array_merge($buttons, array(
- array('type' => 'next',
- 'name' => ts('Confirm Registration'),
- 'spacing' => ' ',
- 'isDefault' => TRUE,
- )));
+ array(
+ 'type' => 'next',
+ 'name' => ts('Confirm Registration'),
+ 'spacing' => ' ',
+ 'isDefault' => TRUE,
+ ),
+ ));
}
}
// status class other than Negative should be able to cancel registration.
if (array_key_exists($this->_participantStatusId,
- CRM_Event_PseudoConstant::participantStatus(NULL, "class != 'Negative'")
- )) {
+ CRM_Event_PseudoConstant::participantStatus(NULL, "class != 'Negative'")
+ )) {
$cancelConfirm = ts('Are you sure you want to cancel your registration for this event?');
$buttons = array_merge($buttons, array(
- array('type' => 'submit',
- 'name' => ts('Cancel Registration'),
- 'spacing' => ' ',
- 'js' => array('onclick' => 'return confirm(\'' . $cancelConfirm . '\');'),
- )));
+ array(
+ 'type' => 'submit',
+ 'name' => ts('Cancel Registration'),
+ 'spacing' => ' ',
+ 'js' => array('onclick' => 'return confirm(\'' . $cancelConfirm . '\');'),
+ ),
+ ));
if (!$statusMsg) {
$statusMsg = ts('You can cancel your registration for %1 by clicking "Cancel Registration".', array(1 => $values['title']));
}
}
/**
- * Process the form submission
+ * Process the form submission.
*
- * @access public
*
* @return void
*/
public function postProcess() {
//get the button.
- $buttonName = $this->controller->getButtonName();
+ $buttonName = $this->controller->getButtonName();
$participantId = $this->_participantId;
if ($buttonName == '_qf_ParticipantConfirm_next') {
);
}
}
-}
+}