From c482fb66a74aa3793522bec1ecccd7793e1710aa Mon Sep 17 00:00:00 2001 From: David Botton Date: Fri, 28 Jan 2022 11:32:04 -0500 Subject: [PATCH] Add multi lines to input dialog --- source/clog-gui.lisp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/source/clog-gui.lisp b/source/clog-gui.lisp index c1e84a6..cf9f233 100644 --- a/source/clog-gui.lisp +++ b/source/clog-gui.lisp @@ -1326,6 +1326,7 @@ is placed in DOM at top of html body instead of bottom of html body." (defun input-dialog (obj content on-input &key (modal t) (title "Input") (size 20) + (rows 1) (default-value "") (left nil) (top nil) (width 300) (height 200) @@ -1336,23 +1337,32 @@ Calls on-input with input box contents or nil if canceled." (unless html-id (setf html-id (clog-connection:generate-id))) (let* ((body (connection-data-item obj "clog-body")) + (inp (if (eql rows 1) + (format nil "" + html-id + size + (escape-string default-value)) + (format nil "" + html-id + size + rows + (escape-string default-value)))) (win (create-gui-window obj :title title :content (format nil "
~A

-

+~A

-
" content - html-id ; input - size - (escape-string default-value) - html-id ; ok - html-id) ; cancel +" + content + inp + html-id ; ok + html-id) ; cancel :top top :left left :width width