let MAKE-NUMBER-INPUT-FIELD accept a default value
This commit is contained in:
parent
47424d504f
commit
29abe30461
|
@ -355,12 +355,15 @@
|
|||
(lambda maybe-further-attributes
|
||||
(let ((name (generate-input-field-name "number")))
|
||||
(optionals maybe-further-attributes
|
||||
((attributes XML-attribute?))
|
||||
((default (lambda (a) (or (number? a)
|
||||
(string-or-symbol? a))))
|
||||
(attributes XML-attribute?))
|
||||
(make-input-field
|
||||
name
|
||||
number-input-field-transformer
|
||||
`(input (@ (type "text")
|
||||
(name ,name)
|
||||
(value ,default)
|
||||
,(and attributes (cdr attributes))))))))))
|
||||
|
||||
(define (make-password-input-field . maybe-further-attributes)
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
(define (make-number-input-field/default default)
|
||||
(if default
|
||||
(make-number-input-field `(@ (value ,default)))
|
||||
(make-number-input-field default)
|
||||
(make-number-input-field)))
|
||||
|
||||
(define (show-page operator-pair number1 number2 . maybe-update-text)
|
||||
|
|
Loading…
Reference in New Issue