Fix lunch initialization
Change-Id: Ibc5a96ec674614756db15b45150a9358992a3ee4
diff --git a/User.php b/User.php
index 1b459cf..8326033 100644
--- a/User.php
+++ b/User.php
@@ -62,6 +62,9 @@
$this->vegetarian_dinner = false;
$this->registered_at = date("Y-m-d H:i:s") . "UTC";
$this->earlybird_registration = false;
+ $this->lunch_day_1 = "";
+ $this->lunch_day_2 = "";
+ $this->lunch_day_3 = "";
$this->total_due = 0.0;
$this->invoice = "";
}
diff --git a/templates/register.htm b/templates/register.htm
index 085b03a..227c3a5 100644
--- a/templates/register.htm
+++ b/templates/register.htm
@@ -533,19 +533,19 @@
</label>
</div>
<div class="form-check">
- <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_1" id="lunch_day_1a" <?php if ($_POST['lunch_day_1']=="Avocado Bowl" ) echo 'checked'; ?> value="Avocado Bowl">
+ <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_1" id="lunch_day_1a" <?php if ($_POST[ 'lunch_day_1']=="Avocado Bowl" ) echo 'checked'; ?> value="Avocado Bowl">
<label class="form-check-label" for="lunch_day_1a" data-bs-toggle="tooltip" title="avocado, beluga lentils, sweet potatoes, baby spinach, chickpeas, cilantro, yuzu dressing, mixed nuts">
Avocado Bowl <small>(vegan, gluten-free)</small>
</label>
</div>
<div class="form-check">
- <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_1" id="lunch_day_1b" <?php if ($_POST['lunch_day_1']=="Thai Rice Bowl" ) echo 'checked'; ?> value="Thai Rice Bowl">
+ <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_1" id="lunch_day_1b" <?php if ($_POST[ 'lunch_day_1']=="Thai Rice Bowl" ) echo 'checked'; ?> value="Thai Rice Bowl">
<label class="form-check-label" for="lunch_day_1b" data-bs-toggle="tooltip" title="red Thai curry, rice, snow peas, roasted peppers, red cabbage, peanuts, roasted onions, cilantro">
Thai Rice Bowl <small>(vegan)</small>
</label>
</div>
<div class="form-check">
- <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_1" id="lunch_day_1c" <?php if ($_POST['lunch_day_1']=="Udon Noodle Bowl" ) echo 'checked'; ?> value="Udon Noodle Bowl">
+ <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_1" id="lunch_day_1c" <?php if ($_POST[ 'lunch_day_1']=="Udon Noodle Bowl" ) echo 'checked'; ?> value="Udon Noodle Bowl">
<label class="form-check-label" for="lunch_day_1c" data-bs-toggle="tooltip" title="udon noodles, peanut sauce, sautéed vegetables, sweet potatoes, cilantro, chicken breast">
Udon Noodle Bowl
</label>
@@ -560,19 +560,19 @@
</label>
</div>
<div class="form-check">
- <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_2" id="lunch_day_2a" <?php if ($_POST['lunch_day_2']=="New Oriental Bowl" ) echo 'checked'; ?> value="New Oriental Bowl">
+ <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_2" id="lunch_day_2a" <?php if ($_POST[ 'lunch_day_2']=="New Oriental Bowl" ) echo 'checked'; ?> value="New Oriental Bowl">
<label class="form-check-label" for="lunch_day_2a" data-bs-toggle="tooltip" title="beetroot hummus, cumin cauliflower, chickpeas, pomegranate, baby spinach, red cabbage, cilantro falafel, tahini dressing">
New Oriental Bowl <small>(vegan)</small>
</label>
</div>
<div class="form-check">
- <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_2" id="lunch_day_2b" <?php if ($_POST['lunch_day_2']=="Vegetarian Lasagne" ) echo 'checked'; ?> value="Vegetarian Lasagne">
+ <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_2" id="lunch_day_2b" <?php if ($_POST[ 'lunch_day_2']=="Vegetarian Lasagne" ) echo 'checked'; ?> value="Vegetarian Lasagne">
<label class="form-check-label" for="lunch_day_2b" data-bs-toggle="tooltip" title="with fennel leek">
Lasagne <small>(vegetarian)</small>
</label>
</div>
<div class="form-check">
- <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_2" id="lunch_day_2b" <?php if ($_POST['lunch_day_2']=="Lasagne" ) echo 'checked'; ?> value="Lasagne">
+ <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_2" id="lunch_day_2b" <?php if ($_POST[ 'lunch_day_2']=="Lasagne" ) echo 'checked'; ?> value="Lasagne">
<label class="form-check-label" for="lunch_day_2b" data-bs-toggle="tooltip" title="with beef">
Lasagne
</label>
@@ -581,19 +581,19 @@
<div id="lunch-3" class="form-outline col-md-4">
<label class="form-label" for="pw2">Friday, 21 July</label>
<div class="form-check">
- <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_3" id="lunch_day_3a" value="--" <?php if (!isset($_POST[ 'lunch_day_3']) || $_POST[ 'lunch_day_3']=="--" ) echo 'checked'; ?> >
+ <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_3" id="lunch_day_3a" value="--" <?php if (!isset($_POST[ 'lunch_day_3']) || $_POST[ 'lunch_day_3']=="--" ) echo 'checked'; ?> >
<label class="form-check-label" for="lunch_day_3a">
--
</label>
</div>
<div class="form-check">
- <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_3" id="lunch_day_3b" <?php if ($_POST['lunch_day_2']=="Tofu Teriyaki Bowl" ) echo 'checked'; ?> value="Tofu Teriyaki Bowl">
+ <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_3" id="lunch_day_3b" <?php if ($_POST[ 'lunch_day_2']=="Tofu Teriyaki Bowl" ) echo 'checked'; ?> value="Tofu Teriyaki Bowl">
<label class="form-check-label" for="lunch_day_3b" data-bs-toggle="tooltip" title="Udon noodles, raw vegetable salad, roasted peanuts, tofu, sesame, coriander, teriyaki dressing">
Tofu Teriyaki Bowl <small>(vegan, gluten-free)</small>
</label>
</div>
<div class="form-check">
- <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_3" id="lunch_day_3c" <?php if ($_POST['lunch_day_2']=="Salamango Bowl" ) echo 'checked'; ?> value="Salamango Bowl">
+ <input class="form-check-input" oninput="update_total_due()" type="radio" name="lunch_day_3" id="lunch_day_3c" <?php if ($_POST[ 'lunch_day_2']=="Salamango Bowl" ) echo 'checked'; ?> value="Salamango Bowl">
<label class="form-check-label" for="lunch_day_3c" data-bs-toggle="tooltip" title="smoked salmon, avocado, edamame-pea mix, mango, marinated cucumber, soy-ginger dressing, wasabi mayo">
Salamango Bowl <small>(fish, gluten-free)</small>
</label>