<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{default}">
<head>
    <link rel="stylesheet" href="/css/level.css"/>
</head>
<body>
    <div layout:fragment="content">
        <div class="Group_create_level">
            <h1>Генератор уровней</h1>
        </div>
        <form action="#" th:action="@{/level/{id}(id=${id})}" th:object="${levelDTO}" method="post">
            <div class="myModalContent">
                <input
                        type='text'
                        class="add-level-input form-control"
                        id="level"
                        th:field="${levelDTO.level}"
                        required="true"
                />
                <button
                        class="modalButton"
                        type="submit"
                >
                    <span th:if="${id == null}">Добавить</span>
                    <span th:if="${id != null}">Сохранить</span>
                </button>
                <button
                        class="modalButton"
                        type="submit"
                        th:href="@{/level}"
                >
                    Назад
                </button>
            </div>
        </form>
    </div>
</body>
</html>