Add optional args to MAKE-TEXTAREA-INPUT-FIELD: ROWS COLS READONLY
This commit is contained in:
parent
63afb5d073
commit
219bcaa4fe
|
@ -108,14 +108,22 @@
|
||||||
(let ((name (generate-input-field-name "textarea")))
|
(let ((name (generate-input-field-name "textarea")))
|
||||||
(optionals maybe-further-attributes
|
(optionals maybe-further-attributes
|
||||||
((default-text simple-default?)
|
((default-text simple-default?)
|
||||||
|
(rows number?)
|
||||||
|
(cols number?)
|
||||||
|
(readonly symbol?)
|
||||||
(attributes sxml-attribute?))
|
(attributes sxml-attribute?))
|
||||||
|
(let ((extra-attributes '()))
|
||||||
|
(if rows (set! extra-attributes (cons `(rows ,rows) extra-attributes)))
|
||||||
|
(if cols (set! extra-attributes (cons `(cols ,cols) extra-attributes)))
|
||||||
|
(if (eq? readonly 'readonly)
|
||||||
|
(set! extra-attributes (cons '(readonly) extra-attributes)))
|
||||||
(make-input-field
|
(make-input-field
|
||||||
name "textarea"
|
name "textarea"
|
||||||
identity
|
identity
|
||||||
(make-input-field-attributes
|
(make-input-field-attributes
|
||||||
(and default-text)
|
(and default-text)
|
||||||
(sxml-attribute-attributes attributes))
|
(cons extra-attributes (sxml-attribute-attributes attributes)))
|
||||||
make-textarea-input-field-html-tree))))
|
make-textarea-input-field-html-tree)))))
|
||||||
|
|
||||||
(define (make-textarea-input-field-html-tree input-field)
|
(define (make-textarea-input-field-html-tree input-field)
|
||||||
(let ((attributes (input-field-attributes input-field)))
|
(let ((attributes (input-field-attributes input-field)))
|
||||||
|
|
Loading…
Reference in New Issue