
<!Doctype html>
<html>
 <head>
   <meta charset="utf-8">
   <title>Donor Page</title>
   <link rel="icon" href="favicon.ico">
      <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
   <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script>
   <link rel="stylesheet" href="/css/admins.css">
 </head>
 <body>
  <div id="Heading Box">
   <h1 id="Heading">Organ Donation Management System</h1>
 </div>

<!-- Navbar -->
  <div class="navbar navbar-expand-lg navbar-light bg-light">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">
      <img src="/css/logo.png" alt=""  height="20">
    </a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav mr-auto mb-2 mb-lg-0">
        <li class="nav-item" id="nav-logo">
          <a class="nav-link active" aria-current="page" href="#Heading Box"></a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="/organavail">Check for Organ Availability</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="/logind">Login for Donor</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="/register">Sign-up for Donor</a>
        </li>
          <li class="nav-item">
            <a class="nav-link" href="/loginad">Admin Login</a>
          </li>
      </ul>
      </div>
      <div class="log"><a class="nav-link" href="/logout">LOGOUT</a></div>
  </div>
</div>
<br>
<br>

<div class="container">
  <div class="row">
    <div class="col-6">
<form action="/auth/dupdate" method="POST">
    <h2> Update Donor Information  </h2>
    <label for="donorid" class="form-label">Enter Donor ID</label>
    <input type="text" class="form-control" placeholder="XXXXXX" value="<%= user %>" required name="donorid" readonly>
    <label for="field" class="form-label">Choose field</label>
    <select id="field" name="field" size="1">
    <option value="Contact">Contact</option>
    <option value="Password">Password</option>
    <option value="Name">Next of Kin</option>
    <option value="KContact">Next of Kin Contact</option>
    <option value="Ailments">Ailments</option>
    </select>
    <br>
    <label for="New Value" class="form-label">New value</label>
    <input type="text" class="form-control" placeholder="XXXXXX" value="" required name="newvalue">
    <% if(md){ %>
        <div class="err"><%= md %></div>
    <% } %>
  <br>
  <input type="submit" value="Update">

</form>


    </div>
    <div class="col-6">
      <form action="/auth/withdraw" method="POST">
      <h2> Withdraw organ Donation Application </h2>
      <label for="donorid" class="form-label">Enter Donor ID</label>
      <input type="text" class="form-control" placeholder="XXXXXX" value="<%= user %>" required name="donorid" readonly>
      <label for="donorid" class="form-label">Reason for withdrawal (if any) </label>
      <input type="text" class="form-control" placeholder="Please enter a valid reason" value="" required name="reason">
      <% if(mw){ %>
        <div class="err"><%= mw %></div>
     <% } %>
      <br>
      <input type="submit">
    </form>
    </div>

  </div>
<br><br><br><br>
</div>
 </body>
</html>