Skip to content

Commit c3c4490

Browse files
Update calculator.html
act: -> thymeleaf form implemented -> thymeleaf output implemented
1 parent 760661c commit c3c4490

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/main/resources/templates/calculator.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="en" xmlns:th="http://www.thymeleaf.org">
33
<head>
44
<meta charset="UTF-8">
55
<meta name="description" content="The Calculator is designed to simplify the process of estimating the total cost of an imported product.">
@@ -48,26 +48,26 @@
4848

4949
<div class="card-body">
5050

51-
<form>
51+
<form th:action="@{/calculator/orchestrator}" method="post">
5252
<h4>Domestic Shipping</h4>
5353
<label>Fee <b>(¥)</b></label>
5454
<div class="input-group mb-3">
5555
<input type="number" class="form-control" value="12"
56-
aria-label="numbers" name="domestic-shipping" min="1" required>
56+
aria-label="numbers" name="domesticShippingfixedFee" min="1" required>
5757
</div>
5858

5959
<h4 class="pt-3 border-top">International Shipping</h4>
6060
<label>Weigh <b>(kg)</b> </label>
6161
<div class="input-group mb-3">
6262
<input type="number" class="form-control" placeholder="0.200"
63-
aria-label="numbers" name="weigh" min="1" required>
63+
aria-label="numbers" name="productWeight" min="0" step="0.001" required>
6464
</div>
6565

6666
<h4 class="pt-3 border-top">Exchange Currency</h4>
6767
<label>Product Price <b>(¥)</b> </label>
6868
<div class="input-group mb-3">
6969
<input type="number" class="form-control"
70-
aria-label="numbers" name="weigh" min="1" required>
70+
aria-label="numbers" name="weigh" min="1">
7171
</div>
7272
<button type="submit" class="btn btn-dark col-12">Calculate</button>
7373
</form>
@@ -87,8 +87,10 @@ <h4 class="pt-3 border-top">Exchange Currency</h4>
8787
</a>
8888
</div>
8989

90-
<p>Result</p>
9190

91+
<div class="card-body">
92+
<p th:text="${productFinalCost}"> Should display the calculation</p>
93+
</div>
9294
</div>
9395

9496
</div>

0 commit comments

Comments
 (0)