adds
This commit is contained in:
parent
01d1143337
commit
c2a7538da2
@ -10,6 +10,8 @@ import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.sql.Array;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/order")
|
||||
|
@ -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>
|
||||
</select>
|
||||
</div>
|
||||
<p class="d-flex justify-content-between">
|
||||
<label>Продукты:</label>
|
||||
<div th:each="product : ${products}">
|
||||
<input type="checkbox" name="genres" th:text="${product.name} + '(Цена: ' + ${product.cost} + ') '"
|
||||
th:value="${product.id} "
|
||||
th:field="*{productsId}"
|
||||
/>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<label>Продукты:</label>
|
||||
<select id="author" class="form-select" multiple size="6" th:field="*{productsId}" >
|
||||
<option th:each="product: ${products}"
|
||||
th:value="${product.id}"
|
||||
th:text="${product.name}" ></option>
|
||||
</select>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
@ -8,9 +8,9 @@
|
||||
<div layout:fragment="content">
|
||||
<form action="#" th:action="@{/order/dop}" th:object="${productDto}" method="get">
|
||||
<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>
|
||||
</select>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user