diff options
| author | unwox <me@unwox.com> | 2025-09-07 20:22:47 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2025-09-07 22:16:39 +0600 |
| commit | 88d1725520afde9fe10a3daa1ad5c1c0a552f041 (patch) | |
| tree | 04069377658ac0b6c2fa903e0d2b42e8f2221031 /pages/shop/add.fnl | |
| parent | 4b0373bb42e21153f63d33f3546be9095d495f27 (diff) | |
small fixes
Diffstat (limited to 'pages/shop/add.fnl')
| -rw-r--r-- | pages/shop/add.fnl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/pages/shop/add.fnl b/pages/shop/add.fnl index 8fcfdf1..5b5bfc5 100644 --- a/pages/shop/add.fnl +++ b/pages/shop/add.fnl @@ -1,4 +1,4 @@ -(import-macros {:compile-html <>} :macros) +(import-macros {:compile-html HTML} :macros) (local templates (require :templates)) (local dicts (require :dicts)) (local forms (require :forms)) @@ -17,8 +17,14 @@ (forms.text-input "title" "Полное название" true 0 200) (forms.select-input "type" "Вид чая" true dicts.tea-type) (forms.select-input "packaging" "Упаковка" true dicts.tea-packaging) + (forms.number-input "year" "Год изготовления" false 1950 + (tonumber (os.date "%Y"))) + (forms.select-input "season" "Сезон изготовления" false dicts.tea-season) + (forms.text-input "region" "Место изготовления" false 0 500) (forms.textarea-input "short_description" "Короткое описание" true 0 1000) - (forms.textarea-input "description" "Полное описание" true 0 20000) + (forms.textarea-input "description" "Полное описание" false 0 20000) + (forms.textarea-input "recommendations" "Рекомендации по завариванию" + false 0 20000) (forms.number-input "price_per" "Цена" true 0 100000 "За штуку или грамм.") (forms.number-input "stock" "Сколько в наличии" true 0 100000 @@ -53,10 +59,10 @@ (error "empty data for insert SQL-statement")))) (fn content [form data errors authenticated?] - [(<> + [(HTML [:div {:class "side"} (templates.header "/shop" authenticated?)]) - (<> + (HTML [:div {:class "content"} [:div {:class "mb-1"} [:a {:href "/shop"} "⟵ Обратно к списку"]] |
