Extract eliss-hidden-input
This commit is contained in:
parent
49639ee0ee
commit
4a35a88c78
1 changed files with 17 additions and 10 deletions
27
eliss.el
27
eliss.el
|
@ -84,6 +84,18 @@ certain other properties.
|
||||||
`((placeholder ,placeholder)))
|
`((placeholder ,placeholder)))
|
||||||
,@(when default `((value ,default)))))))))
|
,@(when default `((value ,default)))))))))
|
||||||
|
|
||||||
|
(defun eliss-hidden-input (name &rest plist)
|
||||||
|
"Create a input with type hidden.
|
||||||
|
|
||||||
|
Give it the name NAME and take some other properties from
|
||||||
|
proprety list PLIST:
|
||||||
|
|
||||||
|
- `:value' specifies the value attribute the input should get."
|
||||||
|
(let ((value (plist-get plist :value)))
|
||||||
|
`(input (@ (type "hidden")
|
||||||
|
(name ,name)
|
||||||
|
,@(when value `((value ,value)))))))
|
||||||
|
|
||||||
(defun eliss-project-page (httpcon)
|
(defun eliss-project-page (httpcon)
|
||||||
"Send a list of issues and an issue-creation form over HTTPCON."
|
"Send a list of issues and an issue-creation form over HTTPCON."
|
||||||
(let* ((project (match-string 1 (elnode-http-mapping httpcon)))
|
(let* ((project (match-string 1 (elnode-http-mapping httpcon)))
|
||||||
|
@ -123,11 +135,8 @@ certain other properties.
|
||||||
,(eliss-control-group
|
,(eliss-control-group
|
||||||
"email" "Email"
|
"email" "Email"
|
||||||
:placeholder "john@example.com")
|
:placeholder "john@example.com")
|
||||||
(input (@ (type "hidden")
|
,(eliss-hidden-input "i-m-human" :value "t")
|
||||||
(name "i-m-human")
|
,(eliss-hidden-input "i-r-bot")
|
||||||
(value "t")))
|
|
||||||
(input (@ (type "hidden")
|
|
||||||
(name "i-r-bot")))
|
|
||||||
(input (@ (type "submit")
|
(input (@ (type "submit")
|
||||||
(value "Complain")
|
(value "Complain")
|
||||||
(class "pull-right"))))
|
(class "pull-right"))))
|
||||||
|
@ -196,11 +205,9 @@ certain other properties.
|
||||||
"email" "Email"
|
"email" "Email"
|
||||||
:placeholder "john@example.com"
|
:placeholder "john@example.com"
|
||||||
:required t)
|
:required t)
|
||||||
(input (@ (type "hidden")
|
,(eliss-hidden-input "i-m-human"
|
||||||
(name "i-m-human")
|
:value "t")
|
||||||
(value "t")))
|
,(eliss-hidden-input "i-r-bot")
|
||||||
(input (@ (type "hidden")
|
|
||||||
(name "i-r-bot")))
|
|
||||||
(input (@ (type "submit")
|
(input (@ (type "submit")
|
||||||
(value "Comment")
|
(value "Comment")
|
||||||
(class "pull-right"))))
|
(class "pull-right"))))
|
||||||
|
|
Loading…
Reference in a new issue