Fix naming and calling
This commit is contained in:
parent
52a76dce53
commit
e72e1ad9b3
1 changed files with 9 additions and 6 deletions
|
@ -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)
|
||||||
`(spinneret:with-html
|
(if (string= type "combo")
|
||||||
,@(loop for input in inputs
|
`(spinneret:with-html
|
||||||
collect
|
(:li (select () ,@inputs)))
|
||||||
`(:li (apply-input-form ,type ,group ,input))))))
|
`(spinneret:with-html
|
||||||
|
,@(loop for input in inputs
|
||||||
|
collect
|
||||||
|
`(: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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue