<!DOCTYPE html>
<html lang="en"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{default}">
<head>
</head>
<body>
<div layout:fragment="content">
    <div th:text="${errors}" class="margin-bottom alert-danger"></div>
    <form action="#" th:action="@{/creator/{id}(id=${id})}" th:object="${CreatorMangaDto}" method="post">
        <div class="mb-3">
            <label for="creatorName" class="form-label">creatorName</label>
            <input id="creatorName" type='text' class="form-control" th:field="${CreatorMangaDto.creatorName}" required="true"/>
        </div>
        <div class="mb-3">
            <label for="hashedPassword" class="form-label">hashedPassword</label>
            <input id="hashedPassword" type='text' class="form-control" th:field="${CreatorMangaDto.hashedPassword}" required="true"/>
        </div>
        <div class="mb-3">
            <button type="submit" class="btn btn-primary button-fixed">
                <span th:if="${id == null}">Добавить</span>
                <span th:if="${id != null}">Обновить</span>
            </button>
            <a class="btn btn-secondary button-fixed" th:href="@{/creator}">
                Назад
            </a>
        </div>
    </form>
</div>
</body>
</html>