Skip to content

Commit

Permalink
Hone the delete file form.
Browse files Browse the repository at this point in the history
Still doesn't work :-< Do I have to use query parameters?
  • Loading branch information
Jesse Alama committed May 11, 2010
1 parent e351432 commit fba4d0f
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions site.lisp
Expand Up @@ -273,19 +273,25 @@ the directory for ID) to a static file dispatchers.")
(defun uploads-table-checkbox-form (label-text)
(with-current-uploads (uploads)
(htm
(:table
(:tr
(:th "Filename")
(:th label-text))
(dolist (file uploads)
(htm
(:tr
(:td (str file))
(:td (:label :for file
label-text)
(:input :type "checkbox"
:id file
:name file)))))))))
(:form :method "post"
:action "upload"
(:table
(:tr
(:th "Filename")
(:th label-text))
(dolist (file uploads)
(let ((delete-name (format nil "delete-~A" file)))
(htm
(:tr
(:td (str file))
(:td (:label :for file
label-text)
(:input :type "checkbox"
:name delete-name)))))))
; (:label :for "delete-checked-files" "Delete checked files")
(:input :type "submit"
:value "Delete checked files"
:id "delete-checked-files")))))

(defun uploads-radio-form ()
(with-current-uploads (uploads)
Expand Down Expand Up @@ -425,8 +431,6 @@ the directory for ID) to a static file dispatchers.")
(when (and session-id uploads)
(htm
(:div :class "uploaded"
(:form :method "post"
:action "upload")
(uploads-table-checkbox-form "Delete?"))
(:p "If you're done uploading files, you may continue to " (:a :href "compile" "the compilation page") ".")))
(:div :class "chooser"
Expand Down

0 comments on commit fba4d0f

Please sign in to comment.