mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 17:41:38 +02:00
🎉 Add terms check to register
This commit is contained in:
parent
93311b8b98
commit
6c47df20af
8 changed files with 152 additions and 83 deletions
|
@ -89,7 +89,6 @@
|
|||
(mf/set-ref-val! state-ref new-value)
|
||||
(render inc))
|
||||
|
||||
|
||||
ISwap
|
||||
(-swap! [self f]
|
||||
(let [f (wrap-update-fn f opts)]
|
||||
|
@ -119,7 +118,10 @@
|
|||
([form field trim?]
|
||||
(fn [event]
|
||||
(let [target (dom/get-target event)
|
||||
value (dom/get-value target)]
|
||||
value (if (or (= (.-type target) "checkbox")
|
||||
(= (.-type target) "radio"))
|
||||
(.-checked target)
|
||||
(dom/get-value target))]
|
||||
(swap! form (fn [state]
|
||||
(-> state
|
||||
(assoc-in [:data field] (if trim? (str/trim value) value))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue