hopefully fixing form

This commit is contained in:
Chris Cochrun 2024-04-27 21:48:33 -05:00
parent a5fe2c2592
commit 930c02c95d

View file

@ -488,25 +488,25 @@ with the image attached"
(registration (cdr (assoc "registration" data :test 'string=))) (registration (cdr (assoc "registration" data :test 'string=)))
(health (cdr (assoc "health-form" data :test 'string=)))) (health (cdr (assoc "health-form" data :test 'string=))))
(log:info data) (log:info data)
(when (not data)
(return))
;; This is extremely necessary so that cors is right ;; This is extremely necessary so that cors is right
(setf (tbnl:header-out :access-control-expose-headers) "*") (setf (tbnl:header-out :access-control-expose-headers) "*")
(mail-camp-form data nil)
(post-camp-data data) (post-camp-data data)
(if (string= health "bleh") (if (string= health "bleh")
(progn (uiop:println "Selected health later") (progn (uiop:println "Selected health later")
(cond ((string= registration "now") (cond ((string= registration "now")
(setf (hunchentoot:header-out :HX-Redirect) "https://secure.myvanco.com/L-Z772/campaign/C-13JPJ") (setf (hunchentoot:header-out :HX-Redirect) "https://secure.myvanco.com/L-Z772/campaign/C-13JPJ")
(log:info (tbnl:headers-out*)) (log:info (tbnl:headers-out*))
(log:info "Sending them to pay now") (log:info "Sending them to pay now"))
(mail-camp-form data nil))
((string= registration "full") ((string= registration "full")
(setf (tbnl:header-out :HX-Redirect) "https://secure.myvanco.com/L-Z772/campaign/C-13JQE") (setf (tbnl:header-out :HX-Redirect) "https://secure.myvanco.com/L-Z772/campaign/C-13JQE")
(log:info (tbnl:headers-out*)) (log:info (tbnl:headers-out*))
(log:info "Sending them to pay full amount") (log:info "Sending them to pay full amount"))
(mail-camp-form data nil))
((string= registration "later") ((string= registration "later")
(let ((first-name (cdr (assoc "first-name" data :test 'string=))) (let ((first-name (cdr (assoc "first-name" data :test 'string=)))
(last-name (cdr (assoc "last-name" data :test 'string=)))) (last-name (cdr (assoc "last-name" data :test 'string=))))
(mail-camp-form data nil)
(log:info "Sending the camp thank you snippet") (log:info "Sending the camp thank you snippet")
(with-html-string (with-html-string
(:div (:div
@ -521,8 +521,7 @@ with the image attached"
(when (string= health "bleh") (when (string= health "bleh")
(setf (tbnl:header-out :HX-Redirect) (format nil "/camp-health-form/?registration=~A" registration)) (setf (tbnl:header-out :HX-Redirect) (format nil "/camp-health-form/?registration=~A" registration))
(log:info (tbnl:headers-out*)) (log:info (tbnl:headers-out*))
(log:info "Sending them to the health form for camp") (log:info "Sending them to the health form for camp")))))
(mail-camp-form data nil)))))
(defun main () (defun main ()
(start-server 4242) (start-server 4242)