|
65 | 65 | :shown true}
|
66 | 66 | :placeholder (i18n/label :t/password-creation-placeholder-1)
|
67 | 67 | :on-change-text on-change-password
|
68 |
| - :on-focus #(on-input-focus :password)}] |
| 68 | + :on-focus on-input-focus}] |
69 | 69 | [rn/view {:style style/space-between-inputs}]
|
70 | 70 | [password-with-hint
|
71 | 71 | {:hint {:text hint-2-text
|
|
75 | 75 | :error? error?
|
76 | 76 | :placeholder (i18n/label :t/password-creation-placeholder-2)
|
77 | 77 | :on-change-text on-change-repeat-password
|
78 |
| - :on-focus #(on-input-focus :repeat-password) |
| 78 | + :on-focus on-input-focus |
79 | 79 | :on-blur on-blur-repeat-password}]]))
|
80 | 80 |
|
81 | 81 | (def strength-status
|
|
146 | 146 | :passwords-match? same-passwords?
|
147 | 147 | :empty-password? empty-password?
|
148 | 148 | :show-password-validation? @show-password-validation?
|
149 |
| - :on-input-focus (fn [input-id] |
| 149 | + :on-input-focus (fn [] |
150 | 150 | (scroll-to-end-fn)
|
151 |
| - (reset! focused-input input-id)) |
| 151 | + (reset! focused-input :password)) |
152 | 152 | :on-change-password (fn [new-value]
|
153 | 153 | (reset! password new-value)
|
154 | 154 | (when (same-password-length?)
|
|
162 | 162 | (reset! show-password-validation? true))}]]
|
163 | 163 |
|
164 | 164 | [rn/view {:style style/bottom-part}
|
| 165 | + [rn/view {:style style/disclaimer-container} |
| 166 | + [quo/disclaimer |
| 167 | + {:on-change #(reset! accepts-disclaimer? %) |
| 168 | + :checked? @accepts-disclaimer?} |
| 169 | + (i18n/label :t/password-creation-disclaimer)]] |
| 170 | + |
165 | 171 | (when (= @focused-input :password)
|
166 | 172 | [help
|
167 | 173 | {:validations validations
|
168 | 174 | :password-strength password-strength}])
|
169 | 175 |
|
170 |
| - (when (= @focused-input :repeat-password) |
171 |
| - [rn/view {:style style/disclaimer-container} |
172 |
| - [quo/disclaimer |
173 |
| - {:blur? true |
174 |
| - :checked? @accepts-disclaimer? |
175 |
| - :on-change #(reset! accepts-disclaimer? %)} |
176 |
| - (i18n/label :t/password-creation-disclaimer)]]) |
177 |
| - |
178 | 176 | [rn/view {:style style/button-container}
|
179 | 177 | [quo/button
|
180 | 178 | {:disabled (not meet-requirements?)
|
|
0 commit comments