diff --git a/layouts/shortcodes/health-form.html b/layouts/shortcodes/health-form.html index 10af639..87aeebb 100644 --- a/layouts/shortcodes/health-form.html +++ b/layouts/shortcodes/health-form.html @@ -225,26 +225,26 @@

2024-2025 Health Form

- +
- -
- - When were you born? * required +
- - What is your parent's first and last name? * required + -
@@ -265,36 +265,37 @@
- - Parent Cell phone +
- - Home phone +
- - Additional Emergency Contact + -
- - Doctor + - -
diff --git a/src/main.lisp b/src/main.lisp index a83ec80..f1d382e 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -374,7 +374,6 @@ with the image attached" (attachment nil)) (loop :for d :in data :do (progn - (uiop:println d) (if (string= "first-name" (car d)) (progn (setf first-name (cdr d)))) @@ -397,21 +396,22 @@ with the image attached" (setf attachment path) (log:info attachment))))) (log:info data) - (mail-health-form data attachment) - (cond ((string= registration "now") - (setf (hunchentoot:header-out :HX-Redirect) "https://secure.myvanco.com/L-Z772/campaign/C-13JPJ")) - ((string= registration "full") - (setf (tbnl:header-out :HX-Redirect) "https://secure.myvanco.com/L-Z772/campaign/C-13JQE")) - ((string= registration "later") - (with-html-string - (:div - :class "mt-8" - (:h2 (format nil - "Thank You ~A!" - (concat - first-name " " last-name))) - (:p :class "text-md" - "If you'd like to pay for your registration go to the donate tab in the top right when you are ready and find the camp registration option."))))))) + (when data + (mail-health-form data attachment) + (cond ((string= registration "now") + (setf (hunchentoot:header-out :HX-Redirect) "https://secure.myvanco.com/L-Z772/campaign/C-13JPJ")) + ((string= registration "full") + (setf (tbnl:header-out :HX-Redirect) "https://secure.myvanco.com/L-Z772/campaign/C-13JQE")) + ((string= registration "later") + (with-html-string + (:div + :class "mt-8" + (:h2 (format nil + "Thank You ~A!" + (concat + first-name " " last-name))) + (:p :class "text-md" + "If you'd like to pay for your registration go to the donate tab in the top right when you are ready and find the camp registration option.")))))))) (hunchentoot:define-easy-handler (camp-form :uri "/camp-form") () (let* ((request-type (hunchentoot:request-method hunchentoot:*request*))