fix(web/panettone): Fix more calls to (id nil) in new issue form

Change-Id: Id514d80e00005b7b7eb2f305e92af33ca70d6964
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1594
Tested-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
This commit is contained in:
Griffin Smith 2020-08-03 09:27:43 -04:00 committed by glittershark
parent 708e94532d
commit 117e7316a0

View file

@ -224,38 +224,41 @@
(render/issue-list :issues issues)))) (render/issue-list :issues issues))))
(defun render/issue-form (&optional issue message) (defun render/issue-form (&optional issue message)
(render () (let ((editing (and issue (id issue))))
(:header (render ()
(:h1 (:header
(who:esc (:h1
(if (and issue (id issue)) (who:esc
"Edit Issue" "New Issue")))) (if editing "Edit Issue" "New Issue"))))
(:main (:main
(render/alert message) (render/alert message)
(:form :method "post" (:form :method "post"
:action (if (id issue) :action (if editing
(format nil "/issues/~A" (format nil "/issues/~A"
(id issue)) (id issue))
"/issues") "/issues")
:class "issue-form" :class "issue-form"
(:div (:div
(:input :type "text" (:input :type "text"
:id "subject" :id "subject"
:name "subject" :name "subject"
:placeholder "Subject" :placeholder "Subject"
:value (subject issue))) :value (when editing
(subject issue))))
(:div (:div
(:textarea :name "body" (:textarea :name "body"
:placeholder "Description" :placeholder "Description"
:rows 10 :rows 10
(who:esc (body issue)))) (who:esc
(when editing
(body issue)))))
(:input :type "submit" (:input :type "submit"
:value :value
(if (id issue) (if editing
"Save Issue" "Save Issue"
"Create Issue")))))) "Create Issue")))))))
(defun render/new-comment (issue-id) (defun render/new-comment (issue-id)
(who:with-html-output (*standard-output*) (who:with-html-output (*standard-output*)