Make checkable more bootstrap look a like

This commit is contained in:
Marcus Kammer 2023-09-06 11:43:55 +02:00
parent 60f7ed2c8f
commit cf0a9f0f88

View file

@ -45,12 +45,18 @@ TYPE: The type of the control (either 'radio' or 'checkbox').
NAME: The name attribute for the control. NAME: The name attribute for the control.
VALUE: The value attribute for the control." VALUE: The value attribute for the control."
(let ((name-str (concatenate 'string "group-" (clean-form-str name))) (let* ((name-str (concatenate 'string "group-" (clean-form-str name)))
(value-str (string-trim '(#\Space) value))) (value-str (string-trim '(#\Space) value))
(value-prop-str (clean-form-str value-str))
(class-str (concatenate 'string "form-check-label " name-str)))
(spinneret:with-html (spinneret:with-html
(:label :class "form-label" (:div :class "form-check"
(:input :type type :name name-str :value (clean-form-str value-str)) (:label :class class-str
(format nil " ~a" value-str))))) (:input :type type
:name name-str
:value value-prop-str
:class "form-check-input")
(format nil " ~a" value-str))))))
(defun ctrl-describe (id text) (defun ctrl-describe (id text)
"Generates a descriptive text element for a form control. "Generates a descriptive text element for a form control.