diff options
author | Tom Willemse | 2013-05-19 03:16:56 +0200 |
---|---|---|
committer | Tom Willemse | 2013-05-19 03:16:56 +0200 |
commit | 4a35a88c782a63b180e6c538ea773c9d1df354ad (patch) | |
tree | a5f09ea30055827427e8637a0b901439183bde8e | |
parent | 49639ee0ee1426f074a5bc0ad759ca2920fa422b (diff) | |
download | eliss-master.tar.gz eliss-master.zip |
-rw-r--r-- | eliss.el | 27 |
1 files changed, 17 insertions, 10 deletions
@@ -84,6 +84,18 @@ certain other properties. `((placeholder ,placeholder))) ,@(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) "Send a list of issues and an issue-creation form over HTTPCON." (let* ((project (match-string 1 (elnode-http-mapping httpcon))) @@ -123,11 +135,8 @@ certain other properties. ,(eliss-control-group "email" "Email" :placeholder "john@example.com") - (input (@ (type "hidden") - (name "i-m-human") - (value "t"))) - (input (@ (type "hidden") - (name "i-r-bot"))) + ,(eliss-hidden-input "i-m-human" :value "t") + ,(eliss-hidden-input "i-r-bot") (input (@ (type "submit") (value "Complain") (class "pull-right")))) @@ -196,11 +205,9 @@ certain other properties. "email" "Email" :placeholder "john@example.com" :required t) - (input (@ (type "hidden") - (name "i-m-human") - (value "t"))) - (input (@ (type "hidden") - (name "i-r-bot"))) + ,(eliss-hidden-input "i-m-human" + :value "t") + ,(eliss-hidden-input "i-r-bot") (input (@ (type "submit") (value "Comment") (class "pull-right")))) |