|
|
|
@ -175,8 +175,46 @@ if (isset($personid) && $database->has('people', ['personid' => $personid])) {
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
if ($type == "adult" || $type == "youth") {
|
|
|
|
|
// TODO: camp days selection
|
|
|
|
|
// TODO: help area selection
|
|
|
|
|
if ($type == "adult") {
|
|
|
|
|
$positions = [
|
|
|
|
|
"None" => "No Preference",
|
|
|
|
|
"Den Walker" => "Den Walker",
|
|
|
|
|
"Station Leader" => "Station Leader",
|
|
|
|
|
"Tot Lot" => "Tot Lot",
|
|
|
|
|
"First Aid" => "First Aid",
|
|
|
|
|
"Floater" => "Floater"
|
|
|
|
|
];
|
|
|
|
|
} else {
|
|
|
|
|
$positions = [
|
|
|
|
|
"None" => "No Preference",
|
|
|
|
|
"Den Chief" => "Den Chief",
|
|
|
|
|
"Station" => "Station",
|
|
|
|
|
"Tot Lot" => "Tot Lot",
|
|
|
|
|
"Floater" => "Floater"
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
$textboxes = array_merge($textboxes, [
|
|
|
|
|
[
|
|
|
|
|
"label" => "Available Days",
|
|
|
|
|
"name" => "days",
|
|
|
|
|
"type" => "checkboxes",
|
|
|
|
|
"options" => [
|
|
|
|
|
"Tu" => "Tuesday",
|
|
|
|
|
"We" => "Wednesday",
|
|
|
|
|
"Th" => "Thursday",
|
|
|
|
|
"Fr" => "Friday",
|
|
|
|
|
],
|
|
|
|
|
"error" => "Choose at least one day."
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
"label" => "Preferred Position",
|
|
|
|
|
"name" => "position",
|
|
|
|
|
"type" => "select",
|
|
|
|
|
"width" => 5,
|
|
|
|
|
"options" => $positions,
|
|
|
|
|
"error" => "Choose a position."
|
|
|
|
|
]
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
$textboxes = array_merge($textboxes, [
|
|
|
|
|
[
|
|
|
|
@ -206,7 +244,7 @@ if (isset($personid) && $database->has('people', ['personid' => $personid])) {
|
|
|
|
|
<div class="form-group mb-3">
|
|
|
|
|
<label class="mb-0"><?php echo $item['label']; ?>:</label>
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<?php if (empty($item['type']) || $item['type'] != "select") { ?>
|
|
|
|
|
<?php if (empty($item['type']) || ($item['type'] != "select" && $item['type'] != "checkboxes")) { ?>
|
|
|
|
|
<input type="<?php echo (empty($item['type']) ? "text" : $item['type']); ?>"
|
|
|
|
|
name="<?php echo $item['name']; ?>"
|
|
|
|
|
class="form-control"
|
|
|
|
@ -250,9 +288,26 @@ if (isset($personid) && $database->has('people', ['personid' => $personid])) {
|
|
|
|
|
?>
|
|
|
|
|
</select>
|
|
|
|
|
<?php
|
|
|
|
|
} else if ($item['type'] == "checkboxes") {
|
|
|
|
|
?>
|
|
|
|
|
<div class="d-flex justify-content-left flex-wrap">
|
|
|
|
|
<?php
|
|
|
|
|
foreach ($item['options'] as $value => $label) {
|
|
|
|
|
?>
|
|
|
|
|
<div class="form-check m-1">
|
|
|
|
|
<input class="form-check-input" type="checkbox" name="<?php echo $item['name']; ?>" value="<?php echo $value; ?>">
|
|
|
|
|
<label class="form-check-label">
|
|
|
|
|
<?php echo $label; ?>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<div class="invalid-tooltip">
|
|
|
|
|
<div class="invalid-feedback">
|
|
|
|
|
<?php echo $item['error']; ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -262,6 +317,5 @@ if (isset($personid) && $database->has('people', ['personid' => $personid])) {
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|