This commit is contained in:
Inohara 2023-05-15 14:32:59 +04:00
parent 01d1143337
commit c2a7538da2
3 changed files with 11 additions and 11 deletions

View File

@ -10,6 +10,8 @@ import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
import java.sql.Array;
import java.util.ArrayList;
@Controller @Controller
@RequestMapping("/order") @RequestMapping("/order")

View File

@ -21,15 +21,13 @@
<option th:each="value: ${suppliers}" th:selected="${selectedSupplier != null and selectedSupplier == value.id}" th:value="${value.id}" th:text=" ${value.name}"></option> <option th:each="value: ${suppliers}" th:selected="${selectedSupplier != null and selectedSupplier == value.id}" th:value="${value.id}" th:text=" ${value.name}"></option>
</select> </select>
</div> </div>
<p class="d-flex justify-content-between">
<label>Продукты:</label> <label>Продукты:</label>
<div th:each="product : ${products}"> <select id="author" class="form-select" multiple size="6" th:field="*{productsId}" >
<input type="checkbox" name="genres" th:text="${product.name} + '(Цена: ' + ${product.cost} + ') '" <option th:each="product: ${products}"
th:value="${product.id} " th:value="${product.id}"
th:field="*{productsId}" th:text="${product.name}" ></option>
/> </select>
</div>
</p>
</form> </form>
</div> </div>

View File

@ -8,9 +8,9 @@
<div layout:fragment="content"> <div layout:fragment="content">
<form action="#" th:action="@{/order/dop}" th:object="${productDto}" method="get"> <form action="#" th:action="@{/order/dop}" th:object="${productDto}" method="get">
<div class="mb-3"> <div class="mb-3">
<label for="author" class="form-label">Продукт</label> <label for="product" class="form-label">Продукт</label>
<select id="author" class="form-select" th:field="*{id}" th:name="${selectedProduct}"> <select id="product" class="form-select" th:field="*{id}" th:name="${selectedProduct}">
<option th:each="value: ${products}" th:selected="${selectedProduct != null and selectedProduct == value.id}" th:value="${value.id}" th:text="${value.name}"></option> <option th:each="value: ${products}" th:selected="${selectedProduct != null and selectedProduct == value.id}" th:value="${value.id}" th:text="${value.name}"></option>
</select> </select>
</div> </div>