From 88d1725520afde9fe10a3daa1ad5c1c0a552f041 Mon Sep 17 00:00:00 2001 From: unwox Date: Sun, 7 Sep 2025 20:22:47 +0600 Subject: small fixes --- pages/shop/add.fnl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'pages/shop/add.fnl') 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"} "⟵ Обратно к списку"]] -- cgit v1.2.3