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