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