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

Loading…
Cancel
Save