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"]]]
[:section.edit-instance
[:h2 "Edit Instance"] [:h2 "Edit Instance"]
(hform/form-to [:post (path :instance-edit instance)] (hform/form-to [:post (path :instance-edit instance)]
(form/render-widgets form form-data req) (form/render-widgets form form-data req)
(hform/submit-button "Edit!")) (hform/submit-button "Edit!"))
(hform/form-to [:delete (path :instance-delete instance)] (hform/form-to [:delete (path :instance-delete instance)]
(anti-forgery-field) (anti-forgery-field)
(view/delete-btn)) (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,6 +175,7 @@
:link-uuid (:uuid link)})] :link-uuid (:uuid link)})]
(anti-forgery-field) (anti-forgery-field)
(view/delete-btn))]])]]]) (view/delete-btn))]])]]])
[:section.link-instance
[:h2 "Link Instance with Instance of Schema..."] [:h2 "Link Instance with Instance of Schema..."]
[:ul [:ul
(for [schema schemas] (for [schema schemas]
@ -181,7 +183,7 @@
[:a {:href (path :instance-link-selection [:a {:href (path :instance-link-selection
{:uuid (:uuid instance) {:uuid (:uuid instance)
:schema-uuid (:uuid schema)})} :schema-uuid (:uuid schema)})}
(h (:name 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