summaryrefslogtreecommitdiff
path: root/pages/shop/add.fnl
diff options
context:
space:
mode:
authorunwox <me@unwox.com>2025-10-03 11:56:37 +0600
committerunwox <me@unwox.com>2025-10-13 23:11:01 +0600
commit3f5ade2e7a139bb4405437e8fc5546aafc7b05ef (patch)
tree77c437958d74b591f11ec207d16749cf207a51e3 /pages/shop/add.fnl
parentf5a70e6a446e00969adb866ef2e2d10bf33bc4a8 (diff)
WIP shop
Diffstat (limited to 'pages/shop/add.fnl')
-rw-r--r--pages/shop/add.fnl7
1 files changed, 3 insertions, 4 deletions
diff --git a/pages/shop/add.fnl b/pages/shop/add.fnl
index b5fa8de..01b83d6 100644
--- a/pages/shop/add.fnl
+++ b/pages/shop/add.fnl
@@ -68,12 +68,11 @@
(fn content [form data errors authenticated?]
[(HTML
- [:div {:class "side"}
+ [:aside {}
(templates.header "/shop" authenticated?)])
(HTML
[:div {:class "content"}
- [:div {:class "mb-1"}
- [:a {:href "/shop"} "⟵ Обратно к списку"]]
+ [:div {:class "back"} [:a {:href "/shop"} "⟵ Обратно к списку"]]
[:h2 {} "Добавить товар"]
(forms.render-form form data errors)])])
@@ -81,7 +80,7 @@
(if (not authenticated?)
(values 302 {:Location "/shop"} "")
(if request.form
- (let [data (forms.convert-values-from-html product-form request.form db)
+ (let [data (forms.html-form->data product-form request.form db)
errors (forms.validate-form product-form request.form)
has-errors? (not (lib.empty-table? errors))]
(if has-errors?