<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>Edit person</title>
    <style type="text/css">
        body {
            padding: 50px;
        }

        label {
            display: inline-block;
            width: 100px;
        }

        input:read-only {
            background: lightgray;
        }

        .row {
            margin-top: 10px;
        }
    </style>
</head>
<body>

<!-- Person edition -->
<form id="edit-form" th:action="@{/edit(id=${person.id})}" th:method="post" action="edit.html">
    <h1>Person Info:</h1>

    <div class="row">
        <label for="id-input">ID:</label>
        <input id="id-input" type="text" readonly="readonly" th:value="${person.id}" value="1"/>
    </div>

    <div class="row">
        <label for="holder-input">Name:</label>
        <input id="holder-input" name="name" type="text" th:value="${person.name}" value="John Doe"/>
    </div>

    <div class="row">
        <button type="submit">Save</button>
    </div>
</form>

</body>
</html>
