                                                    :class "close panel-edit"
                                                    :on-click #(do (.preventDefault %)
                                                                 (evidence/init-evidence-form evidence state true))
-                                                   :role "button" :data-toggle "collapse"
+                                                   :role "button"
+                                                   :data-toggle "collapse"
+                                                   :data-target (str "#collapse" id)
                                                    :data-parent "#accordion"
                                                    :href (str "#collapse" id)
                                                    :aria-expanded "true"
-                                                   :aria-controls (str "collapse" id)}
+                                                   ;:aria-controls (str "collapse" id)
+                                                   }
                                           [:i.fa.fa-edit.edit-evidence]]];;edit-button
 
                               [:div [:button {:type "button"
                                               :aria-label "OK"
                                               :class "close"
-                                              :on-click #(do (.preventDefault %)(evidence/delete-evidence! id data state init-data))}
+                                              :data-toggle "collapse"
+                                              ;data-target (str "#collapse" id)
+                                              :on-click #(do (.preventDefault %)
+                                                           (evidence/delete-evidence! id data state init-data))
+                                              :aria-expanded "false"
+                                              :aria-controls (str "collapse" id)
+                                              }
                                      [:i.fa.fa-trash.trash]]] ;;delete-button
                               ])]
 
-                          [:div {:id (str "collapse" id)
-                                 :class "panel-collapse collapse"
-                                 :role "tabpanel"
-                                 :aria-labelledby (str "heading" id)}
+                          [:div.panel-collapse {:id (str "collapse" id)
+                                                :class "collapse"
+                                                :role "tabpanel"
+                                                :aria-labelledby (str "heading" id)}
                            [:div.panel-body.evidence-panel-body {:style {:padding-top "10px"}}
                             [:div.form-group
                              [:label.col-md-3 (t :badge/Name)]

                 [:div.col-md-9
                  [evidence/input {:name "narrative" :rows 5 :cols 40 :atom evidence-narrative-atom } true]]]])

             ]]])

        ;;url input
        (when (= @input-mode :url_input) [:div
                                          [:div.col-md-12
                                           [:div.resource-container {:style {:margin-bottom "10px"}}
                                            [evidence/input {:name "evidence-url" :atom evidence-url-atom :type "url" :placeholder "http://" :preview? (cursor state [:show-preview])}]]]])
        ;;Resource grid
        (when-not @(cursor state [:show-preview])[evidence/resource-input data state init-data])

        ;;Buttons
        [:div.col-md-12
         [:hr]
         (when @(cursor state [:show-preview])[:button {:type "button"
                                                        :class "btn btn-primary"
                                                        :disabled (not (url? @evidence-url-atom))
                                                        :on-click #(do
                                                                     (.preventDefault %)
                                                                     (if (= @input-mode :url_input) (reset! (cursor state [:evidence :properties :resource_type] ) "url"))
                                                                     (evidence/save-badge-evidence data state init-data)
                                                                     (when-not @(cursor state [:evidence :message])(swap! state assoc :tab [settings-tab-content data state init-data]
                                                                                                                          :tab-no 2)))}
                                               (t :core/Add)])
         [:a.cancel {:on-click #(do
                                  (.preventDefault %)
                                  (swap! state assoc :tab [settings-tab-content (dissoc data :evidence) state init-data]
                                         :tab-no 2))}
          (t :core/Cancel)]]]]]]))

(defn evidence-list [data state init-data]
  (let [evidence-name-atom (cursor state [:evidence :name])

                       :href "#":on-click #(do
                                             (.preventDefault %)
                                             (evidence/toggle-input-mode :file_input state))
                       } [:i.fa.fa-files-o] (t :page/Files)]]
           [:div.cancel [:a {:href "#":on-click #(do
                                                   (.preventDefault %)
                                                   (swap! state assoc :tab [settings-tab-content (dissoc data :evidence) state init-data]
                                                          :tab-no 2))}

                         [:i.fa.fa-remove] (t :core/Cancel)]]]]]


        ;;Preview
