mirror of
https://github.com/penpot/penpot.git
synced 2025-05-24 21:26:11 +02:00
🐛 Don't send incorrect flag values on register page.
This commit is contained in:
parent
87dfa8c7fc
commit
45e501ce02
1 changed files with 9 additions and 12 deletions
|
@ -184,12 +184,8 @@
|
||||||
|
|
||||||
(mf/defc register-validate-form
|
(mf/defc register-validate-form
|
||||||
[{:keys [params] :as props}]
|
[{:keys [params] :as props}]
|
||||||
(let [initial (mf/use-memo
|
(let [form (fm/use-form :spec ::register-validate-form
|
||||||
(mf/deps params)
|
:initial params)
|
||||||
(fn []
|
|
||||||
(assoc params :accept-newsletter-subscription false)))
|
|
||||||
form (fm/use-form :spec ::register-validate-form
|
|
||||||
:initial initial)
|
|
||||||
submitted? (mf/use-state false)
|
submitted? (mf/use-state false)
|
||||||
|
|
||||||
on-submit
|
on-submit
|
||||||
|
@ -210,18 +206,19 @@
|
||||||
:tab-index "1"
|
:tab-index "1"
|
||||||
:label (tr "auth.fullname")
|
:label (tr "auth.fullname")
|
||||||
:type "text"}]]
|
:type "text"}]]
|
||||||
|
|
||||||
[:div.fields-row
|
[:div.fields-row
|
||||||
[:& fm/input {:name :accept-terms-and-privacy
|
[:& fm/input {:name :accept-terms-and-privacy
|
||||||
:class "check-primary"
|
:class "check-primary"
|
||||||
:label (tr "auth.terms-privacy-agreement")
|
:label (tr "auth.terms-privacy-agreement")
|
||||||
:type "checkbox"}]]
|
:type "checkbox"}]]
|
||||||
|
|
||||||
(when (contains? @cf/flags :newsletter-registration-check)
|
;; (when (contains? @cf/flags :newsletter-registration-check)
|
||||||
[:div.fields-row
|
;; [:div.fields-row
|
||||||
[:& fm/input {:name :accept-newsletter-subscription
|
;; [:& fm/input {:name :accept-newsletter-subscription
|
||||||
:class "check-primary"
|
;; :class "check-primary"
|
||||||
:label (tr "auth.newsletter-subscription")
|
;; :label (tr "auth.newsletter-subscription")
|
||||||
:type "checkbox"}]])
|
;; :type "checkbox"}]])
|
||||||
|
|
||||||
[:& fm/submit-button
|
[:& fm/submit-button
|
||||||
{:label (tr "auth.register-submit")
|
{:label (tr "auth.register-submit")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue