      :keywords? true
      :params {:status new-status}
      :handler (fn []
-                  (js/setTimeout (fn [] (swap! state assoc :badge-alert nil)) 3000)
-                #_(reload-fn state))
+                  (js/setTimeout (fn [] (swap! state assoc :badge-alert nil)) 2000)
+                  (if reload-fn (reload-fn state)))
      :error-handler (fn [{:keys [status status-text]}])}))
 
-(defn update-visibility [visibility badge state reload-fn]
+(defn update-visibility [visibility badge state]
   (swap! state assoc :badge-alert nil)
   (ajax/POST
     (path-for (str "/obpv1/badge/set_visibility/" (:id badge)))
     {:params {:visibility visibility}
      :handler (fn [data]
                 (when (= (:status data) "success")
-                  (update-status (:id badge) "accepted" state reload-fn)
+                  (update-status (:id badge) "accepted" state nil)
                   (swap! state assoc :badge-alert "accepted" :badge-name (:name badge))
                   ))}))
 

          }(t :admin/Showmore)]
     [show-more-content state]]))

#_(defn visibility-settings [visibility state]
  (fn []
    [:div.col-md-12
     [:div.dropdown
      [:a.dropdown-toggle {:data-toggle "dropdown" :type "button" } (case @(cursor state [:visibility])
                                                                      "public" [:i.fa.fa-globe]
                                                                      "private" [:i.fa.fa-lock]
                                                                      "internal" [:i.fa.fa-group]
                                                                      (t :badge/Public)) #_[:i.fa.fa-share-alt] (case @(cursor state [:visibility])
                                                                                                                  "public" (t :badge/Public)
                                                                                                                  "private" (t :badge/Private)
                                                                                                                  "internal" (t :badge/Shared)
                                                                                                                  (t :badge/Public)) [:i.fa.fa-chevron-down]]
      [info "Set your badge visibility" "bottom"]
      [:ul.dropdown-menu
       [:li [:a {:href "#" :on-click #(do
                                        (.preventDefault %)
                                        (update-visibility "public" state)
                                        )} [:i {:class "fa fa-globe" }] [:div.text (t :badge/Public)]]]
       [:li [:a {:href "#" :on-click #(do
                                        (.preventDefault %)
                                        (update-visibility "internal" state)
                                        )} [:i {:class "fa fa-group" }] [:div.text (t :badge/Shared)]]]
       [:li [:a {:href "#" :on-click #(do
                                        (.preventDefault %)
                                        (update-visibility "private" state)
                                        )} [:i {:class "fa fa-lock" }] [:div.text (t :badge/Private)]]]
       ]]
     [:hr.line]]
    ;]
    ))

(defn pending-badge-content [{:keys [id image_file name description visibility assertion_url meta_badge meta_badge_req issuer_content_name issuer_content_url issued_on issued_by_obf verified_by_obf obf_url]}]
  (let [state (atom {:id id

            {:keys [badge_id content assertion_url]} data
            {:keys [name description tags alignment criteria_content image_file issuer_content_id issuer_content_name issuer_content_url issuer_contact issuer_image issuer_description criteria_url creator_content_id creator_name creator_url creator_email creator_image creator_description message_count endorsement_count ]} (content-setter @selected-language content)]
        [:div
         (if (or verified_by_obf issued_by_obf)
           [:div.row.flip
            (bh/issued-by-obf obf_url verified_by_obf issued_by_obf)])
