<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Place Order</title>
    <link rel="stylesheet" href="/stylesheets/user/profile.css" />
    <link
      href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
      rel="stylesheet"
      integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
      crossorigin="anonymous"
    />
    <script
      src="https://code.jquery.com/jquery-3.7.1.js"
      integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
      crossorigin="anonymous"
    ></script>
  </head>
  <body>
    <%- include('../../templates/header') %>
    <div>
      <form
        class="mt-4"
        action="/submitproject"
        method="post"
        enctype="multipart/form-data"
      >
        <div class="mb-3">
          <label for="categories" class="form-label">Project Type</label>
          <select
            class="form-select"
            name="type"
            id="categories"
            aria-label="Default select example"
            required
            onchange="excludeFirstOption()"
          >
            <option value="" disabled selected>Select Category</option>
            <option value="Web Development">Web Development</option>
            <option value="Design & Logo">Design & Logo</option>
            <option value="Data Analysis and Mining">
              Data Analysis and Mining
            </option>
            <option value="Aws Cloud">Aws Cloud</option>
            <option value="Cyber Security">Cyber Security</option>
          </select>
        </div>
        <div class="mb-3">
          <div class="form-floating">
            <textarea
              class="form-control"
              name="notes"
              placeholder="Leave a comment here"
              id="floatingTextarea2"
              style="height: 100px"
              required
            ></textarea>
            <label for="floatingTextarea2">Project Notes</label>
          </div>
        </div>
        <div class="mb-3">
          <label for="formFile" class="form-label">Attach a file</label>
          <input
            class="form-control"
            name="file"
            type="file"
            id="formFile"
            required
          />
        </div>
        <div class="mb-3">
          <label for="exampleInputPassword1" class="form-label"
            >Initial Payment</label
          >
          <input
            type="text"
            class="form-control"
            disabled
            id="exampleInputPassword1"
            value="<%= plan %>"
          />
        </div>
        <button type="submit" class="btn btn-primary">Pay Now</button>
        <button
          type="button"
          class="btn btn-secondary"
          onclick="location.href='/profile'"
        >
          Cancel
        </button>
      </form>
    </div>

    <%- include('../../templates/footer') %>
    <footer></footer>
    <script src="/javascripts/profile.js"></script>
    <script
      src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"
      integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r"
      crossorigin="anonymous"
    ></script>
    <script
      src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"
      integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy"
      crossorigin="anonymous"
    ></script>

    <script>
      function excludeFirstOption() {
        var selectElement = document.getElementById("categories");
        selectElement.options[0].disabled = true;
      }
    </script>
  </body>
</html>
