                                :resource_id resource_id
                                :resource_type resource_type
                                :mime_type mime_type}}
-           :handler #(show-settings-dialog (:id @state) state init-data)})))))
+           :handler #(init-settings (:id @state) state init-data)})))))
 
 ;;;;
 

(defn save-badge-evidence [data state init-data]
  (let [{:keys [id name narrative url resource_visibility properties]} (:evidence @state)
        {:keys [resource_type mime_type resource_id]} properties
        badge-id (:id data)
        ;init-settings (first (plugin-fun (session/get :plugins) "modal" "show_settings_dialog"))
        ]
    (swap! state assoc :evidence {:message nil})
    (if (and (not (blank? narrative)) (blank? name))
      (swap! state assoc :evidence {:message [:div.alert.alert-warning [:p (t :badge/Emptynamefield)]]

(defn toggle-show-evidence! [id data state init-data]
  (let [visibility-atom (cursor state [:evidence :properties :hidden])
        new-value (not @visibility-atom)
        badgeid (:id @state)]
    (ajax/POST
      (path-for (str "/obpv1/badge/toggle_evidence/" id))
      {:params {:show_evidence new-value
                :user_badge_id (int badgeid)}
       :handler #(init-settings badgeid state init-data)})))

(defn set-page-visibility-to-private [page-id]
  (ajax/POST
