View | Details | Raw Unified | Return to bug 3166 | Differences between
and this patch

Collapse All | Expand All

(-)pages/schedConf/SchedConfHandler.inc.php (-20 / +19 lines)
 Lines 175-200    Link Here 
175
				$templateMgr->assign('backLinkLabel', 'common.back');
175
				$templateMgr->assign('backLinkLabel', 'common.back');
176
				$templateMgr->assign('backLink', Request::url(null, null, 'index'));
176
				$templateMgr->assign('backLink', Request::url(null, null, 'index'));
177
				return $templateMgr->display('common/message.tpl');
177
				return $templateMgr->display('common/message.tpl');
178
			} else {
179
				// Otherwise, allow them to try to pay again.
180
				$registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
181
				$registrationType =& $registrationTypeDao->getRegistrationType($registration->getTypeId());
182
				$queuedPayment =& $paymentManager->createQueuedPayment($schedConf->getConferenceId(), $schedConf->getSchedConfId(), QUEUED_PAYMENT_TYPE_REGISTRATION, $user->getUserId(), $registrationId, $registrationType->getCost(), $registrationType->getCurrencyCodeAlpha());
183
				$queuedPaymentId = $paymentManager->queuePayment($queuedPayment, time() + (60 * 60 * 24 * 30)); // 30 days to complete
184
185
				$paymentManager->displayPaymentForm($queuedPaymentId, $queuedPayment);
186
			}
178
			}
187
		} else {
179
		}
188
			import('registration.form.UserRegistrationForm');
189
180
190
			$form =& new UserRegistrationForm();
181
		import('registration.form.UserRegistrationForm');
191
			if ($form->isLocaleResubmit()) {
182
192
				$form->readInputData();
183
		$form =& new UserRegistrationForm();
193
			} else {
184
		if ($form->isLocaleResubmit()) {
194
				$form->initData();
185
			$form->readInputData();
195
			}
186
		} else {
196
			$form->display();
187
			$form->initData();
197
		}
188
		}
189
		$form->display();
198
	}
190
	}
199
191
200
	/**
192
	/**
 Lines 209-218    Link Here 
209
		$user =& Request::getUser();
201
		$user =& Request::getUser();
210
		$registrationDao =& DAORegistry::getDAO('RegistrationDAO');
202
		$registrationDao =& DAORegistry::getDAO('RegistrationDAO');
211
		if ($user && ($registrationId = $registrationDao->getRegistrationIdByUser($user->getUserId(), $schedConf->getSchedConfId()))) {
203
		if ($user && ($registrationId = $registrationDao->getRegistrationIdByUser($user->getUserId(), $schedConf->getSchedConfId()))) {
212
			// User is already registered. Redirect to a message explaining.
204
			// This user has already registered.
213
			Request::redirect(null, null, null, 'registration');
205
			$registration =& $registrationDao->getRegistration($registrationId);
206
			if ( !$registration || $registration->getDatePaid() ) {
207
				// And they have already paid. Redirect to a message explaining.
208
				Request::redirect(null, null, null, 'registration');
209
			} else {
210
				// Allow them to resubmit the form to change type or pay again.
211
				$registrationDao->deleteRegistrationById($registrationId);
212
			}			
214
		}
213
		}
215
214
		
216
		$templateMgr =& TemplateManager::getManager();
215
		$templateMgr =& TemplateManager::getManager();
217
		$templateMgr->assign('pageHierarchy', array(
216
		$templateMgr->assign('pageHierarchy', array(
218
			array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),
217
			array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),

Return to bug 3166