Add optional args to MAKE-TEXTAREA-INPUT-FIELD: ROWS COLS READONLY

This commit is contained in:
interp 2003-05-04 14:05:40 +00:00
parent 63afb5d073
commit 219bcaa4fe
1 changed files with 15 additions and 7 deletions

View File

@ -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?))
(make-input-field (let ((extra-attributes '()))
name "textarea" (if rows (set! extra-attributes (cons `(rows ,rows) extra-attributes)))
identity (if cols (set! extra-attributes (cons `(cols ,cols) extra-attributes)))
(make-input-field-attributes (if (eq? readonly 'readonly)
(and default-text) (set! extra-attributes (cons '(readonly) extra-attributes)))
(sxml-attribute-attributes attributes)) (make-input-field
make-textarea-input-field-html-tree)))) name "textarea"
identity
(make-input-field-attributes
(and default-text)
(cons extra-attributes (sxml-attribute-attributes attributes)))
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)))