           }(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


(defn visibility-modal [badge state reload-fn]
  (let [visibility (atom (:visibility badge))]
  (create-class {:reagent-render
                 (fn [] [:div#badge-settings {:style {:padding "10px"}}
                         [:form {:class "form-horizontal"}
                          [:div ;{:class "col-md-12"}
                           [:fieldset {:class "form-group visibility"}
                            [:legend {:class "col-md-9 sub-heading"}
                             (t :badge/Badgevisibility) [info {:content (t :badge/Visibilityinfo) :placement "right"}]]
                            [:div {:class (str "col-md-12 " @visibility) :style {:margin-top "20px"}}
                             (if-not (private?)
                               [:div [:input {:id              "visibility-public"
                                              :name            "visibility"
                                              :value           "public"
                                              :type            "radio"
                                              :on-change       #(do
                                                                  (.preventDefault %)
                                                                  (reset! visibility "public"))}]
                                [:i {:class "fa fa-globe" }]
                                [:label {:for "visibility-public"}
                                 (t :badge/Public)]])
                             [:div [:input {:id              "visibility-internal"
                                            :name            "visibility"
                                            :value           "internal"
                                            :type            "radio"
                                            :on-change       #(do
                                                                (.preventDefault %)
                                                                (reset! visibility "internal"))}]
                              [:i {:class "fa fa-group" }]
                              [:label {:for "visibility-internal"}
                               (t :badge/Shared)]]
                             [:div [:input {:id              "visibility-private"
                                            :name            "visibility"
                                            :value           "private"
                                            :type            "radio"
                                            :on-change       #(do
                                                                (.preventDefault %)
                                                                (reset! visibility "private"))
                                            :default-checked (= "private" (:visibility badge)) #_(= "private" (:visibility badge) #_(get-in @state [:badge-settings :visibility]))}]
                              [:i {:class "fa fa-lock" }]
                              [:label {:for "visibility-private"}
                               (t :badge/Private)]]]]]]
                         [:hr.border]
                         [:button.btn.btn-primary {:on-click #(do
                                                                (.preventDefault %)
                                                                (update-visibility @visibility badge state reload-fn)
                                                                )
                                                   :data-dismiss "modal"}(t :core/Save)]
                         ])
                 :component-will-unmount (fn [] (m/close-modal!))})))

(defn badge-pending [badge state reload-fn]
  [:div.row {:key (:id badge)}

       [:button {:class "btn btn-primary"
                 :on-click #(do
                              (m/modal! [visibility-modal badge state reload-fn] {:size :md :hidden (fn [] (reload-fn state))})
                              (.preventDefault %)
                              )
                 :data-dismiss "modal"}
