Refactor postOrder to render confirmation page
This commit is contained in:
parent
47323b32f8
commit
0e762841a3
4 changed files with 38 additions and 55 deletions
9
server/templates/confirmation.html
Normal file
9
server/templates/confirmation.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<header>
|
||||
<h1>Confirmation</h1>
|
||||
</header>
|
||||
<nav>
|
||||
<a href="/">index</a>
|
||||
</nav>
|
||||
<main>
|
||||
<h2>Order {{.ID}} for {{.Name}} {{.Surname}} confirmed</h2>
|
||||
</main>
|
||||
|
|
@ -18,15 +18,15 @@
|
|||
<input type="tel" name="phone" value="{{.Phone}}">
|
||||
<label>location</label>
|
||||
<select name="location">
|
||||
<option value="Kartuzy">Kartuzy</option>
|
||||
<option value="Somonino">Somonino</option>
|
||||
<option {{ if eq .Location "Kartuzy" }}selected{{ end }} value="Kartuzy">Kartuzy</option>
|
||||
<option {{ if eq .Location "Somonino" }}selected{{ end }} value="Somonino">Somonino</option>
|
||||
</select>
|
||||
<label>date</label>
|
||||
<input type="date" name="date" value="{{.Date.Format "2006-01-02"}}">
|
||||
<label>status</label>
|
||||
<select name="status" id="status">
|
||||
<option value="accepted">accepted</option>
|
||||
<option value="done">done</option>
|
||||
<select name="status" id="status" >
|
||||
<option {{ if eq .Status "accepted" }}selected{{ end }} value="accepted">accepted</option>
|
||||
<option {{ if eq .Status "done" }}selected{{ end }} value="done">done</option>
|
||||
</select>
|
||||
<label>paid</label>
|
||||
<input type="number" name="paid" min="0" value="{{.Paid}}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue