remove childcare

This commit is contained in:
Chris Smith
2020-02-28 13:34:33 -06:00
parent 9606a71a4b
commit 924b25da5b
3 changed files with 4 additions and 20 deletions

View File

@@ -18,7 +18,6 @@ $dotenv->required([
'EVENT_TICKET_PRICE_2', 'EVENT_TICKET_PRICE_2',
'EVENT_TICKET_PRICE_3', 'EVENT_TICKET_PRICE_3',
'ENHANCER_TICKET_PRICE', 'ENHANCER_TICKET_PRICE',
'CHILDCARE_PRICE',
'CABANA_PRICE', 'CABANA_PRICE',
'DB_HOST', 'DB_HOST',
'DB_NAME', 'DB_NAME',
@@ -130,7 +129,7 @@ $router->get('/admin/guests/export', function () {
'phone', 'phone',
'childcare? (0=no, 1=yes)', 'childcare? (0=no, 1=yes)',
'valet? (0=no, 1=yes)', 'valet? (0=no, 1=yes)',
'food restrictions? (0=no, 1=vegetarian, 2=vegan)', 'food restrictions? (0=no, 1=vegetarian, 2=vegan, 3=gluten)',
'table', 'table',
'paddle', 'paddle',
'stripe_id', 'stripe_id',
@@ -593,7 +592,6 @@ $router->post('/guest/{uuid}', function ($uuid) {
} }
$guest->phone = $_POST['phone']; $guest->phone = $_POST['phone'];
$guest->childcare = $_POST['childcare'];
$guest->restrictions = $_POST['restrictions']; $guest->restrictions = $_POST['restrictions'];
R::store($guest); R::store($guest);
header('Location: /guest/' . $guest->uuid . '?alert=success'); header('Location: /guest/' . $guest->uuid . '?alert=success');
@@ -657,7 +655,6 @@ $router->post('/manage/{uuid}', function ($uuid) {
} }
$guest->email = $_POST['guests'][$id]['email']; $guest->email = $_POST['guests'][$id]['email'];
$guest->phone = $_POST['guests'][$id]['phone']; $guest->phone = $_POST['guests'][$id]['phone'];
$guest->childcare = $_POST['guests'][$id]['childcare'];
$guest->restrictions = $_POST['guests'][$id]['restrictions']; $guest->restrictions = $_POST['guests'][$id]['restrictions'];
R::store($guest); R::store($guest);

View File

@@ -7,7 +7,6 @@ if (isset($_GET['alert']) && $_GET['alert'] == 'success') { ?>
<div class="row"> <div class="row">
<div class="col-md-12 order-md-1"> <div class="col-md-12 order-md-1">
<h3 class="mb-3">Your information</h3> <h3 class="mb-3">Your information</h3>
<p>Note: childcare is only available for NCM families for $25/child. Payment will be taken on the day of the event.</p>
<form class="needs-validation" novalidate method="POST" id="payment-form"> <form class="needs-validation" novalidate method="POST" id="payment-form">
<input type="hidden" name="uuid" value="<?=$guest->uuid?>"> <input type="hidden" name="uuid" value="<?=$guest->uuid?>">
@@ -17,17 +16,11 @@ if (isset($_GET['alert']) && $_GET['alert'] == 'success') { ?>
<label for="lastName">Phone</label> <label for="lastName">Phone</label>
<input name="phone" type="text" class="form-control" id="phone" value="<?=$guest->phone?>"> <input name="phone" type="text" class="form-control" id="phone" value="<?=$guest->phone?>">
</div> </div>
<div class="col-md-2 mb-3">
<label for="childcare">Childcare?</label>
<select class="form-control" name="childcare">
<option value="0" <?php if (false == $guest->childcare) { echo 'selected'; } ?>>No</option>
<option value="1" <?php if (true == $guest->childcare) { echo 'selected'; } ?>>Yes</option>
</select>
</div>
<div class="col-md-4 mb-3"> <div class="col-md-4 mb-3">
<label for="restrictions">Food preferences?</label> <label for="restrictions">Food preferences?</label>
<select class="form-control" name="restrictions"> <select class="form-control" name="restrictions">
<option value="0" <?php if (0 == $guest->restrictions) { echo 'selected'; } ?>>None</option> <option value="0" <?php if (0 == $guest->restrictions) { echo 'selected'; } ?>>None</option>
<option value="3" <?php if (3 == $guest->restrictions) { echo 'selected'; } ?>>Gluten Free</option>
<option value="1" <?php if (1 == $guest->restrictions) { echo 'selected'; } ?>>Vegetarian</option> <option value="1" <?php if (1 == $guest->restrictions) { echo 'selected'; } ?>>Vegetarian</option>
<option value="2" <?php if (2 == $guest->restrictions) { echo 'selected'; } ?>>Vegan</option> <option value="2" <?php if (2 == $guest->restrictions) { echo 'selected'; } ?>>Vegan</option>
</select> </select>

View File

@@ -32,17 +32,11 @@ if (isset($_GET['alert']) && $_GET['alert'] == 'success') { ?>
<label for="lastName">Phone</label> <label for="lastName">Phone</label>
<input name="guests[<?=$guest->id?>][phone]" type="text" class="form-control" id="phone" value="<?=$guest->phone?>"> <input name="guests[<?=$guest->id?>][phone]" type="text" class="form-control" id="phone" value="<?=$guest->phone?>">
</div> </div>
<div class="col-md-2 mb-3">
<label for="childcare">Childcare?</label>
<select class="form-control" name="guests[<?=$guest->id?>][childcare]">
<option value="0" <?php if (false == $guest->childcare) { echo 'selected'; } ?>>No</option>
<option value="1" <?php if (true == $guest->childcare) { echo 'selected'; } ?>>Yes</option>
</select>
</div>
<div class="col-md-4 mb-3"> <div class="col-md-4 mb-3">
<label for="restrictions">Food preferences?</label> <label for="restrictions">Food preferences?</label>
<select class="form-control" name="guests[<?=$guest->id?>][restrictions]"> <select class="form-control" name="guests[<?=$guest->id?>][restrictions]">
<option value="0" <?php if (0 == $guest->restrictions) { echo 'selected'; } ?>>None</option> <option value="0" <?php if (0 == $guest->restrictions) { echo 'selected'; } ?>>None</option>
<option value="3" <?php if (3 == $guest->restrictions) { echo 'selected'; } ?>>Gluten Free</option>
<option value="1" <?php if (1 == $guest->restrictions) { echo 'selected'; } ?>>Vegetarian</option> <option value="1" <?php if (1 == $guest->restrictions) { echo 'selected'; } ?>>Vegetarian</option>
<option value="2" <?php if (2 == $guest->restrictions) { echo 'selected'; } ?>>Vegan</option> <option value="2" <?php if (2 == $guest->restrictions) { echo 'selected'; } ?>>Vegan</option>
</select> </select>