<!DOCTYPE html>
<html lang="<%= lang %>">
<head>
    <meta charset="UTF-8">
    <title><%= t.patientCreate.title %></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"><%= t.patientCreate.title %></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="<%= t.patientCreate.firstname %>" required>
                <input class="form-control mb-2" name="lastname"
                  placeholder="<%= t.patientCreate.lastname %>" required>
                <input class="form-control mb-2" name="dni"
                  placeholder="<%= t.patientCreate.dni %>" required>

                <select class="form-select mb-2" name="gender">
                    <option value=""><%= t.global.gender %></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="<%= t.patientCreate.email %>">
                <input class="form-control mb-2" name="phone"
                  placeholder="<%= t.patientCreate.phone %>">
                <input class="form-control mb-2" name="street"
                  placeholder="<%= t.patientCreate.street %>">
                <input class="form-control mb-2" name="house_number"
                  placeholder="<%= t.patientCreate.housenumber %>">
                <input class="form-control mb-2" name="postal_code"
                  placeholder="<%= t.patientCreate.zip %>">
                <input class="form-control mb-2" name="city"
                  placeholder="<%= t.patientCreate.city %>">
                <input class="form-control mb-2" name="country"
                  placeholder="<%= t.patientCreate.country %>" value="Deutschland">

                <textarea class="form-control mb-3" name="notes"
                  placeholder="<%= t.patientCreate.notes %>"></textarea>

                <button class="btn btn-primary w-100">
                    <%= t.global.save %>
                </button>
            </form>

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

</body>
</html>
