Got rid of obsolete stuff
Still trying to work out where the obsolete version of the app is hiding!
This commit is contained in:
parent
13f454afb5
commit
c7b6484597
18 changed files with 17 additions and 5403 deletions
|
|
@ -125,6 +125,9 @@
|
|||
(secretary/defroute "/followup" []
|
||||
(rf/dispatch [:set-active-page :followup]))
|
||||
|
||||
(secretary/defroute "/gdpr" []
|
||||
(rf/despatch [:set-active-page :gdpr]))
|
||||
|
||||
(secretary/defroute "/issues" []
|
||||
(rf/dispatch [:set-active-page :issues]))
|
||||
|
||||
|
|
@ -159,6 +162,7 @@
|
|||
|
||||
(defn init! []
|
||||
(rf/dispatch-sync [:initialize-db])
|
||||
(get-current-location)
|
||||
(load-interceptors!)
|
||||
(hook-browser-navigation!)
|
||||
(mount-components))
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@
|
|||
(.getCurrentPosition
|
||||
(.-geolocation js/navigator)
|
||||
(fn [position]
|
||||
(js/console.log "Current location is: " + position)
|
||||
(dispatch [:set-latitude (.-latitude (.-coords position))])
|
||||
(dispatch [:set-longitude (.-longitude (.-coords position))])))
|
||||
(js/console.log "Geolocation not available"))
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
;; OK, the idea here is a GDPR consent form to be signed by the elector
|
||||
|
||||
|
||||
(defn gdpr-panel-render
|
||||
(defn gdpr-render
|
||||
[]
|
||||
(let [elector @(subscribe [:elector])]
|
||||
[:div
|
||||
|
|
@ -51,10 +51,19 @@
|
|||
[:p [:i "If you do not consent, we will store your voting intention
|
||||
only against your electoral district, and not link it to you"]]]]
|
||||
[:tr
|
||||
[:td {:id "signature-pad"}
|
||||
[:canvas]]]]]]
|
||||
[:td
|
||||
[:canvas {:id "signature-pad" :style "width: 100%; min-width 300px; min-height 200px;"}]]]]]]
|
||||
(ui/big-link "I consent" :target "#elector") ;; TODO: need to save the signature
|
||||
(ui/big-link "I DO NOT consent" :target "#elector")]))
|
||||
|
||||
|
||||
(defn gdpr-did-mount
|
||||
[]
|
||||
(js/SignaturePad (.getElementById js/document "signature-pad")))
|
||||
|
||||
|
||||
(defn panel
|
||||
"A reagent class for the GDPR consent form"
|
||||
[]
|
||||
(reagent/create-class {:reagent-render gdpr-render
|
||||
:component-did-mount gdpr-did-mount}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue