more sections for edit form

integration-tests
Josha von Gizycki 6 years ago
parent b2f9446401
commit e593eb7a2a

@ -138,13 +138,14 @@
" | "
[:a {:href (path :instance-show instance)}
"Back to Instance"]]]
[:h2 "Edit Instance"]
(hform/form-to [:post (path :instance-edit instance)]
(form/render-widgets form form-data req)
(hform/submit-button "Edit!"))
(hform/form-to [:delete (path :instance-delete instance)]
(anti-forgery-field)
(view/delete-btn))
[:section.edit-instance
[:h2 "Edit Instance"]
(hform/form-to [:post (path :instance-edit instance)]
(form/render-widgets form form-data req)
(hform/submit-button "Edit!"))
(hform/form-to [:delete (path :instance-delete instance)]
(anti-forgery-field)
(view/delete-btn))]
(when (seq (:links-out instance))
[:section.links-out
[:h2 "Outgoing Links"]
@ -174,14 +175,15 @@
:link-uuid (:uuid link)})]
(anti-forgery-field)
(view/delete-btn))]])]]])
[:h2 "Link Instance with Instance of Schema..."]
[:ul
(for [schema schemas]
[:li
[:a {:href (path :instance-link-selection
{:uuid (:uuid instance)
:schema-uuid (:uuid schema)})}
(h (:name schema))]])]]))
[:section.link-instance
[:h2 "Link Instance with Instance of Schema..."]
[:ul
(for [schema schemas]
[:li
[:a {:href (path :instance-link-selection
{:uuid (:uuid instance)
:schema-uuid (:uuid schema)})}
(h (:name schema))]])]]]))
(defn link-selection [instance schema form req]
(view/layout!

Loading…
Cancel
Save