mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
clog-lookup database table lookups for drop downs and lists boxes
This commit is contained in:
parent
d903791c86
commit
f010b232bb
7 changed files with 271 additions and 15 deletions
|
|
@ -1029,11 +1029,17 @@ optionally fill in with contents of data-list."))
|
|||
;; add-select-option ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defgeneric add-select-option (clog-select value content)
|
||||
(defgeneric add-select-option (clog-select value content &key selected disabled)
|
||||
(:documentation "Add option VALUE to select."))
|
||||
|
||||
(defmethod add-select-option ((obj clog-select) value content)
|
||||
(create-child obj (format nil "<option value='~A'>~A</option>"
|
||||
(defmethod add-select-option ((obj clog-select) value content &key selected disabled)
|
||||
(create-child obj (format nil "<option~A~A value='~A'>~A</option>"
|
||||
(if selected
|
||||
" selected"
|
||||
"")
|
||||
(if disabled
|
||||
" disabled"
|
||||
"")
|
||||
(escape-string value)
|
||||
(escape-string content))
|
||||
:clog-type 'clog-element :auto-place t))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue