Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gendl
gendl
Commits
16afd999
Commit
16afd999
authored
May 05, 2021
by
Dave Cooper
Browse files
fixed double slash in urls
parent
9e590692
Pipeline
#3614
passed with stages
in 9 minutes and 10 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gwl/source/base-html-sheet.lisp
View file @
16afd999
...
...
@@ -110,7 +110,9 @@ object.")
(
format
nil
"~a/~a"
(
first
component
)
(
second
component
))
component
))
(
reverse
(
the
root-path
))))))
(
append
(
mapcar
#'
(
lambda
(
extention
)(
string-append
url-base
"/"
extention
))(
the
url-extensions
))
(
append
(
mapcar
#'
(
lambda
(
extension
)
(
string-append
url-base
(
if
(
zerop
(
length
url-base
))
""
"/"
)
extension
))
(
the
url-extensions
))
(
list
url-base
(
the
descriptive-url
)))))
(
respondent
(
the
bashee
)
:defaulting
)
...
...
@@ -190,8 +192,7 @@ the browser in development mode). Defaults to NIL (the empty list)."
(
format
nil
"/sessions/~a"
(
the
instance-id
))))
(
fixed-url-prefix
(
the
fixed-url-prefix
)))
(
string-append
(
if
fixed-url-prefix
(
format
nil
"/~a"
fixed-url-prefix
)
""
)
session-prefix
"/"
url
)))
(
the
compute-urls
))))
session-prefix
"/"
url
)))
(
the
compute-urls
))))
(
dolist
(
url
urls
)
(
with-all-servers
(
server
)
...
...
@@ -396,6 +397,7 @@ values are set into the specified bashee."
;;
;; FLAG -- this can prolly go away.
;;
#+
nil
(
compute-url
()
(
compute-url
(
the
root-path
)))
...
...
gwl/source/macros.lisp
View file @
16afd999
...
...
@@ -66,8 +66,9 @@
(
defmacro
with-html-form
((
&key
name
id
multipart?
enctype
target
requestor
on-submit
suppress-border?
local-anchor
cl-who?
)
&body
body
)
(
defmacro
with-html-form
((
&key
name
id
multipart?
enctype
target
requestor
on-submit
suppress-border?
local-anchor
cl-who?
(
accept-charset
"UTF-8"
))
&body
body
)
"Enclose a body of code with a form.
...
...
@@ -86,22 +87,23 @@ FLAG -- fill in.
;;html-stream *stream*
))
((
:form
:method
:|post|
:id
,
id
:action
(
string-append
(
or
,
fixed-prefix
""
)
((
:form
:method
:|post|
:accept-charset
,
accept-charset
:id
,
id
:action
(
string-append
(
or
,
fixed-prefix
""
)
(
format
nil
(
if
,
local-anchor
(
format
nil
"/answer#~a"
,
local-anchor
)
"/answer"
)))
:name
,
(
or
name
`
(
the
root-path-string
))
,@
(
if
cl-who?
`
(
:enctype
,
%enctype%
)
`
(
:if*
,
%enctype%
:enctype
,
%enctype%
))
,@
(
if
cl-who?
`
(
:target
,
target
)
`
(
:if*
,
target
:target
,
target
))
,@
(
if
cl-who?
`
(
:on-submit
,
on-submit
)
`
(
:if*
,
on-submit
:onsubmit
,
on-submit
))
,@
(
if
cl-who?
`
(
:style
,
(
when
suppress-border?
"padding: 0; border: 0; margin: 0"
))
`
(
:if*
,
suppress-border?
:style
"padding: 0; border: 0; margin: 0"
)))
:name
,
(
or
name
`
(
the
root-path-string
))
,@
(
if
cl-who?
`
(
:enctype
,
%enctype%
)
`
(
:if*
,
%enctype%
:enctype
,
%enctype%
))
,@
(
if
cl-who?
`
(
:target
,
target
)
`
(
:if*
,
target
:target
,
target
))
,@
(
if
cl-who?
`
(
:on-submit
,
on-submit
)
`
(
:if*
,
on-submit
:onsubmit
,
on-submit
))
,@
(
if
cl-who?
`
(
:style
,
(
when
suppress-border?
"padding: 0; border: 0; margin: 0"
))
`
(
:if*
,
suppress-border?
:style
"padding: 0; border: 0; margin: 0"
)))
((
:input
:type
:hidden
:name
:|requestor|
:value
,
(
if
(
null
requestor
)
`
(
the
url-encoded-root-path
)
`
(
the-object
,
requestor
url-encoded-root-path
))))
((
:input
:type
:hidden
:name
:|requestor|
:value
,
(
if
(
null
requestor
)
`
(
the
url-encoded-root-path
)
`
(
the-object
,
requestor
url-encoded-root-path
))))
((
:input
:type
:hidden
:name
:|iid|
:value
(
the
instance-id
)))
,@
body
)))))
((
:input
:type
:hidden
:name
:|iid|
:value
(
the
instance-id
)))
,@
body
)))))
...
...
gwl/tests/simple-form.gendl
View file @
16afd999
...
...
@@ -14,13 +14,15 @@
((form-section :type 'sheet-section
:inner-html (with-cl-who-string ()
(with-html-form (:cl-who? t)
(:p (str (the name-entry form-control-string))))
((:input :id "ok" :type :submit :value "ok"
:onclick (the (gdl-ajax-call :form-controls (list (the name-entry))))))))
(:p (str (the name-entry form-control-string)))
((:input :id "ok" :type :submit :value "ok"))
#+nil
((:input :id "ok" :type :submit :value "ok"
:onclick (the (gdl-ajax-call :form-controls (list (the name-entry)))))))))
(name-entry :type 'text-form-control
:id "name"
:default "
Däve C
Kṛṣṇa")))
:default "
Radha
Kṛṣṇa")))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment