                  :rating       (if (pos? rating) rating nil)
                  :evidence-url evidence-url}
        :handler (fn []
-                  (.reload js/window.location))})))
+                  (update-state state))})))
 
 (defn settings-modal [{:keys [id name description image_file issued_on expires_on revoked issuer_content_url issuer_content_name issuer_contact issuer_image]} state]
   [:div {:id "badge-settings"}

            [salava.core.ui.helper :refer [path-for]]
            [salava.badge.ui.helper :as bh]))

(defn set-visibility [visibility state]
  (swap! state assoc-in [:badge-settings :visibility] visibility))

(defn delete-badge [id]
  (ajax/DELETE
    (path-for (str "/obpv1/badge/" id))
    {:handler (fn []
                (.reload js/window.location))}))

(defn save-settings [state]
  (let [{:keys [id visibility tags rating evidence-url]} (:badge-settings @state)]

           (t :badge/Cancel)]
          [:button {:type "button"
                    :class "btn btn-warning"
                    :data-dismiss "modal"
                    :on-click #(delete-badge id state)}
           (t :badge/Delete)]]
         [:button {:type "button"
                   :class "btn btn-warning delete-button"
