From e593eb7a2a51c3f6c2f9426a3d591d4451a14fd4 Mon Sep 17 00:00:00 2001 From: Josha von Gizycki Date: Mon, 25 Mar 2019 14:07:46 +0100 Subject: [PATCH] more sections for edit form --- src/wanijo/instance/view.clj | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/wanijo/instance/view.clj b/src/wanijo/instance/view.clj index 503ef82..0433d81 100644 --- a/src/wanijo/instance/view.clj +++ b/src/wanijo/instance/view.clj @@ -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!