polish
This commit is contained in:
parent
6963a88602
commit
e7570a4c20
11 changed files with 138 additions and 5 deletions
11
html/dziekujemy.templ
Normal file
11
html/dziekujemy.templ
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package html
|
||||
|
||||
templ Dziekujemy() {
|
||||
@layout("Dziękujemy"){
|
||||
<p>Dziękujemy! Numer zamówienia: <b id="order-id"></b>. Potwierdzimy zamówienie telefonicznie.</p>
|
||||
<script>
|
||||
const id = new URLSearchParams(location.search).get('order');
|
||||
if (id) document.getElementById('order-id').textContent = id;
|
||||
</script>
|
||||
}
|
||||
}
|
||||
9
html/errors.templ
Normal file
9
html/errors.templ
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package html
|
||||
|
||||
templ FormErrors(msgs []string) {
|
||||
<ul role="alert">
|
||||
for _, m := range msgs {
|
||||
<li>{m}</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ templ Swieta(products []types.Product) {
|
|||
<h2>Złóż zamówienie</h2>
|
||||
<p>Odbiór wszystkich zamówień: <b>24 grudnia</b>. Zamówienia przyjmujemy do <b>15 grudnia</b>. Potwierdzimy zamówienie telefonicznie.</p>
|
||||
<p>Wszystkie zamówienia obejmuje zaliczka o wysokości <b>50zł</b>. </p>
|
||||
<form method="post" action="/order/" >
|
||||
<form method="post" action="/order" hx-post="/order" hx-target="#form-errors" hx-swap="innerHTML" hx-disabled-elt="find button[type=submit]" >
|
||||
<input name="name" type="text" required placeholder="Imie i Nazwisko"/>
|
||||
<input name="phone" type="tel" required placeholder="Numer Telefonu"/>
|
||||
<fieldset>
|
||||
|
|
@ -62,6 +62,7 @@ templ Swieta(products []types.Product) {
|
|||
@product_form(product)
|
||||
}
|
||||
</fieldset>
|
||||
<div id="form-errors" aria-live="polite"></div>
|
||||
<span>Wartość zamówienia: <span id="total_price">0</span></span>
|
||||
<button type="submit">Wyślij zamówienie</button>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue