Ignore:
Timestamp:
07/07/23 12:14:58 (12 months ago)
Author:
HristijanMitic00 <hristijan.mitic.01@…>
Branches:
main
Parents:
1dd9226
Message:

First commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/resources/templates/product_info.html

    r1dd9226 rd14176d  
    1 <!DOCTYPE html>
    2 <html lang="en">
    3 <head>
    4   <meta charset="UTF-8">
    5   <title>$Title$</title>
    6 </head>
    7 <body>
    8 $END$
    9 </body>
    10 </html>
     1<div xmlns:th="http://www.thymeleaf.org" >
     2
     3  <form class="block" th:method="post" th:action="@{'/products/{id}/add-to-cart' (id = ${product.getIdProdukt()})}">
     4      <input type="hidden" name="idKorisnik" id="idKorisnik" th:value="${#request.getRemoteUser()}">
     5      <input type="hidden" name="cena" id="cena" th:value="${price.getIznos()}">
     6      <label style="margin: auto; text-align: center; display: block; padding-top: 20px">Product name</label>
     7      <p style="margin: auto; text-align: center" id="name" name="name" th:value="${product.getIme()}" th:text="${product.getIme()}"></p>
     8      <label style="margin: auto; text-align: center; display: block;  padding-top: 20px">Product description</label>
     9      <p style="margin: auto; text-align: center" name="description" id="description"  th:value="${product.getOpis()}" th:text="${product.getOpis()}"></p>
     10      <label style="margin: auto; text-align: center; display: block ; padding-top: 20px">price</label>
     11      <p style="margin: auto; text-align: center" name="price" id="price" th:value="${price.getIznos()}" th:text="${price.getIznos()}"></p>
     12      <label style="margin: auto; text-align: center; display: block;  padding-top: 20px">Category</label>
     13      <p style="margin: auto; text-align: center;" name="category" id="category" th:value="${kat.getIme()}" th:text="${kat.getIme()}"></p>
     14      <label style="margin: auto; text-align: center; display: block;  padding-top: 20px">Quantity</label>
     15      <input type="number" name="quantity" id="quantity" style="margin: auto; text-align: center; display: block" required="required">
     16
     17
     18      <button style="margin: auto; text-align: center; display: block;  padding-top: 20px" id="submit" type="submit" class="btn btn-primary">Submit</button>
     19      <a style="margin: auto; text-align: center; display: block;  padding-top: 20px; width: 75px" type="button" class="btn btn-primary" href="/products">Back</a>
     20
     21  </form>
     22
     23
     24</div>
Note: See TracChangeset for help on using the changeset viewer.