Fix naming and calling

This commit is contained in:
Marcus Kammer 2023-09-16 20:47:46 +02:00
parent 52a76dce53
commit e72e1ad9b3
Signed by: marcuskammer
GPG key ID: C374817BE285268F

View file

@ -89,13 +89,16 @@ Returns:
The HTML form element generated for the ITEM." The HTML form element generated for the ITEM."
(funcall (choose-input-form type) type group item)) (funcall (choose-input-form type) type group item))
(defmacro process-input-choices (group choice) (defmacro process-choice (group choice)
(multiple-value-bind (type inputs) (multiple-value-bind (type inputs)
(resolve-input-and-choices choice) (resolve-input-and-choices choice)
(if (string= type "combo")
`(spinneret:with-html
(:li (select () ,@inputs)))
`(spinneret:with-html `(spinneret:with-html
,@(loop for input in inputs ,@(loop for input in inputs
collect collect
`(:li (apply-input-form ,type ,group ,input)))))) `(:li (apply-input-form ,type ,group ,input)))))))
(defmacro question (ask group &body body) (defmacro question (ask group &body body)
"This macro generates a fieldset for a question with multiple answers. "This macro generates a fieldset for a question with multiple answers.
@ -113,7 +116,7 @@ Example:
(:fieldset (:legend ,ask) (:fieldset (:legend ,ask)
(:ol ,@(loop for choice in body (:ol ,@(loop for choice in body
append append
`((process-input-choices ,group ,choice)))) `((process-choice ,group ,choice))))
(:hr :class (spacing :property "m" :side "y" :size 4))))) (:hr :class (spacing :property "m" :side "y" :size 4)))))
(defun split-plist-by-keyword (plist) (defun split-plist-by-keyword (plist)