slight adaptation, mainly renaming
This commit is contained in:
parent
64a8793a37
commit
dca13aabde
|
@ -3,9 +3,9 @@
|
|||
scheme-with-scsh)
|
||||
(begin
|
||||
|
||||
(define number-input-field (make-number-input-field))
|
||||
(define number-input (make-number-input-field))
|
||||
|
||||
(define (create-input-page title input-text)
|
||||
(define (create-input-page title input-text number-input)
|
||||
(lambda (new-url)
|
||||
`(html (title ,title)
|
||||
(body
|
||||
|
@ -13,7 +13,7 @@
|
|||
(p
|
||||
(surflet-form ,new-url
|
||||
,input-text " "
|
||||
,number-input-field
|
||||
,number-input
|
||||
,(make-submit-button)))
|
||||
(hr)
|
||||
(p (url "/" "Return to main menu.") (br)
|
||||
|
@ -21,9 +21,9 @@
|
|||
|
||||
(define (get-number title input-text)
|
||||
(let* ((result (send-html/suspend
|
||||
(create-input-page title input-text)))
|
||||
(create-input-page title input-text number-input)))
|
||||
(bindings (get-bindings result))
|
||||
(number (input-field-value number-input-field bindings)))
|
||||
(number (input-field-value number-input bindings)))
|
||||
(if number
|
||||
number
|
||||
(get-number title "Please enter a valid number."))))
|
||||
|
|
Loading…
Reference in New Issue