aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/templates/productEdit.html
blob: dac8ba6a752f7c6e0dc41889e641700f814becdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<div th:replace="~{common :: head}"></div>

<body>
<div th:replace="~{common :: page-header}"></div>

<div class="indent">
    <div id="updateToggleSelector">
        <button id="updateBtn"  class="btn btn-primary" onclick="toggleDisabled()">Изменить</button> <br><br>
        <a th:href="@{/operations(operationProductName=${product.getName()})}">
            <button class="btn btn-primary">Операции с товаром</button>
        </a><br><br>
        <a th:href="@{/storage(storageName=${product.getName()})}">
            <button class="btn btn-primary">К хранению товара</button>
        </a><br><br>
    </div>

    <form method="post" action="/product">
        <input disabled hidden id="productId" name="productId" th:value="${product.getId()}">

        <label for="productName">Название:</label>
        <input disabled type="text" id="productName" name="productName" required th:value="${product.getName()}"><br><br>

        <label for="productHeight">Высота:</label>
        <input disabled type="text" id="productHeight" name="productHeight" required th:value="${product.getHeight()}"><br><br>

        <label for="productWidth">Ширина:</label>
        <input disabled type="text" id="productWidth" name="productWidth" required th:value="${product.getWidth()}"><br><br>

        <label for="productDepth">Глубина:</label>
        <input disabled type="text" id="productDepth" name="productDepth" required th:value="${product.getDepth()}"><br><br>

        <label for="productMaxStorageDuration">Срок хранения (дни):</label>
        <input disabled type="text" id="productMaxStorageDuration" name="productMaxStorageDuration" th:value="${product.getMaxStorageDuration() == null ? '' : product.getMaxStorageDuration().toDays()}"><br><br>

        <input id="saveBtn" type="submit" value="Сохранить" class="btn btn-primary" hidden>

    </form>
</div>


<div th:replace="~{common :: site-footer}"></div>
<div th:replace="~{common :: site-script}"></div>
<div th:replace="~{common :: editFieldsToggle}"></div>

</body>
</html>