<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <title>Patient anlegen</title>
 <link rel="stylesheet" href="/css/bootstrap.min.css">
</head>
<body class="bg-light">

<div class="container mt-5">
    <%- include("partials/flash") %>
    <div class="card shadow mx-auto" style="max-width: 600px;">
        <div class="card-body">

            <h3 class="mb-3">Neuer Patient</h3>

            <% if (error) { %>
                <div class="alert alert-danger"><%= error %></div>
            <% } %>

            <form method="POST" action="/patients/create">

                <input class="form-control mb-2" name="firstname" placeholder="Vorname" required>
                <input class="form-control mb-2" name="lastname" placeholder="Nachname" required>
                <input class="form-control mb-2" name="dni" placeholder="N.I.E. / DNI" required>
                <select class="form-select mb-2" name="gender">
                    <option value="">Geschlecht</option>
                    <option value="m">Männlich</option>
                    <option value="w">Weiblich</option>
                    <option value="d">Divers</option>
                </select>

                <input class="form-control mb-2" type="date" name="birthdate" required>
                <input class="form-control mb-2" name="email" placeholder="E-Mail">
                <input class="form-control mb-2" name="phone" placeholder="Telefon">

                <input class="form-control mb-2" name="street" placeholder="Straße">
                <input class="form-control mb-2" name="house_number" placeholder="Hausnummer">
                <input class="form-control mb-2" name="postal_code" placeholder="PLZ">
                <input class="form-control mb-2" name="city" placeholder="Ort">
                <input class="form-control mb-2" name="country" placeholder="Land" value="Deutschland">

                <textarea class="form-control mb-3"
                          name="notes"
                          placeholder="Notizen"></textarea>

                <button class="btn btn-primary w-100">
                    Patient speichern
                </button>
            </form>

        </div>
    </div>
</div>

</body>
</html>
