<main class="raffle__content raffle_content-error section__padding">

      <div class="raffle__content-detail">
          <div class="raffle__content-header">
            <h1><span >E-Raffle</span> Entry Registration</h1>
            <img src="views/admin/img/assets/icon/GX_WHITE.png" alt="GX Logo" >
          </div>

          <form onsubmit="return validation()" role="form" method="POST" enctype="multipart/form-data">

            <div class="raffle__content-detail_input raffle_content-fullname">
              <label for="fname">Full name:</label>
              <div class="input">
                <input type="text" name="firstName" id="fname"  maxlength="30" placeholder="First Name" />
                <input type="text" name="middleInitial" id="minitial" maxlength="1"  placeholder="MI" />
                <input type="text" name="lastName" id="lname" maxlength="30"  placeholder="Last Name" />
              </div>
            </div>

            <div class="raffle__content-detail_input raffle_content-address">
              <label for="address">Complete Address:</label>
              <div class="input">
                <input type="text" name="address" id="address" maxlength="255"  placeholder="Complete Address" />
                <input type="text" name="zipcode" id="zipcode" maxlength="6"  placeholder="zip code" />
              </div>
            </div>
            <div class="raffle__content-detail_input date-of-birth">
              <label for="age">Age:</label>
              <div class="input">
                <input type="number" name="age" id="age"  placeholder="Age"  required/>
              </div>
            </div>

            <div class="raffle__content-detail_input raffle_content-contacts">
            <label for="email">Email:</label>
            <div class="input">
              <input type="email" name="registeredMail" id="registeredEmail" maxlength="255"  placeholder="Email Address" />
            </div>

            </div>
            <div class="raffle__content-detail_input raffle_content-contacts">
            <label for="cnumber">Contact #:</label>
            <div class="input">
              <input type="text" name="contactNumber" id="cnumber" maxlength="11" placeholder="Contact Number" />
            </div>
            </div>
              <div class="raffle__content-detail_input raffle_content-order">
                <label for="dName">Participating Branch:</label>
                <div class="input">

                  <select name="unitName" id="uName" required>
                  <option value="">Item Unit</option>
                  <?php foreach ($model as $item) { ?>
                  <option value="<?= $item['unitName']; ?>">

                    <?= $item['unitName']; ?>

                    </option>
                  <?php
                  };

                  ?>
                  </select>
                </div>
              </div>
              <div class="raffle__content-detail_input raffle_content-dop" id="dop">
                <label for="dop">Purchase Date:</label>
                <div class="input">
                  <input type="date" name="dateOfPurch" id="dop" min="2023-11-10" max="2023-12-10"  required/>
                </div>
              </div>


            <div class="raffle__content-detail_input raffle_content-order">
              <label for="receiptNumber">Receipt Number:</label>
              <div class="input">
                <input type="text" name="receiptNumber" id="receiptNumber" maxlength="20" placeholder="Receipt Number"  />
              </div>
            </div>
            <div class="raffle__content-detail_input raffle_content-order">
              <label for="receiptAmount">Receipt Amount:</label>
              <div class="input">
                <input type="text" name="receiptAmount" id="receiptAmount" maxlength="15"  placeholder="Receipt Amount" />
              </div>
            </div>

            <div class="raffle__content-detail_label">
              <label for="file-input" class="upload">Proof of Purchase Image(10MB):</label>
              <div class="raffle__content-detail_file-upload input">
                  <input type="file" class="file-input" name="file-input" required>
              </div>
            </div>

            <div class="raffle__content-detail_btn">

                <div class="raffle__content-terms">
                  <input type="checkbox" id="checkbox" name="checkbox">
                  <label for="checkbox" aria-label>By ticking this box I have read and agree to the terms and conditions <span>*</span></label>
                </div>
                <!-- <input type="submit" id="btn-submit" name="submit" value="Register" disabled> -->
                <button id="btn-submit" class="btn__register" name="submit" disabled>Register</button>
            </div>
        </form>
      </div>
<!-- <div class="raffle_content-errors">
        <span id="error-firstname"></span>
        <span id="error-lastname"></span>
        <span id="error-address"></span>
        <span id="error-birthdate"></span>
        <span id="error-email"></span>
        <span id="error-contactnumber"></span>
        <span id="error-dealername"></span>
        <span id="error-purchdate"></span>
        <span id="error-serialnumber"></span>
        <span id="error-ordernumber"></span>
      </div> -->
    </main>

    <script defer>


let checkboxes = $("input[type='checkbox']"),
  submitButt = $("button[id='btn-submit']");

checkboxes.click(function () {
  submitButt.attr("disabled", !checkboxes.is(":checked"));
});
    </script>

<script defer src="views/js/create.js">

    </script>


