-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It is now possible to book a single participant.
- Loading branch information
Showing
6 changed files
with
86 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,11 @@ | ||
<?php | ||
$eventId = $_REQUEST['eid']; | ||
$requiredFields = array(); | ||
$requiredFields[] = 'customerName'; | ||
|
||
$missingFields = false; | ||
foreach($requiredFields as $field) | ||
{ | ||
if(empty($_REQUEST[$field])) | ||
{ | ||
$missingFields = true; | ||
} | ||
$singlePersonBooking = get_option('eduadmin-singlePersonBooking', false); | ||
if($singlePersonBooking) { | ||
include_once("__bookSingleParticipant.php"); | ||
} else { | ||
include_once("__bookMultipleParticipants.php"); | ||
} | ||
|
||
if($missingFields) | ||
{ | ||
// TODO: Show an error message that some fields are missing | ||
// Should not be able to happen, since we should validate the fields first | ||
// And then we'd have to go through the trouble to recreate all participants. | ||
} | ||
else | ||
{ | ||
$singlePersonBooking = get_option('eduadmin-singlePersonBooking', false); | ||
if($singlePersonBooking) { | ||
include_once("__bookSingleParticipant.php"); | ||
} else { | ||
include_once("__bookMultipleParticipants.php"); | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters