         [text-field :name-tag "badge name and keywords" "search by badge name and keywords" state]
         [text-field :issuer-name (t :gallery/Issuer) (t :gallery/Searchbyissuer) state]
         ])
-     [g/grid-radio-buttons (str (t :core/Order) ":") "order" (order-radio-values) :order state search-timer]]))
+     [g/grid-radio-buttons (str (t :core/Order) ":") "order" (order-radio-values) :order state fetch-badges]]))
 
 (defn badge-grid-element [element-data state]
   (let [{:keys [id image_file name description issuer_content_name issuer_content_url recipients badge_content_id]} element-data


(defn handler [site-navi params]
  (let [user-id (:user-id params)
        badge_content_id (:badge_content_id params)
        state (atom {:value #{}
                     :user-id user-id
                     :badges []
                     :countries []
                     :country-selected ""
                     :advanced-search false
                     :name-tag ""
                     :recipient-name ""
                     :issuer-name ""
                     :order "mtime"
                     :timer nil
                     :items #{}
                     :ajax-message nil})]
    (init-data state)
    (fn []
      (if (session/get :user)
        (layout/default site-navi [content state badge_content_id])

                                        ;(if badge_content_id (open-modal badge_content_id true))
                                        )}))

(defn init-data [state {:keys [current-country name-tag issuer-name order]}]
  (ajax/GET
   (path-for "/obpv1/application/")
   {:params  {:country  (trim current-country)
              :name_tag (trim name-tag)
              :issuer   (trim issuer-name)
              :order    (trim order)}
    :handler (fn [data]
               (let [{:keys [applications countries user-country]} data]
                 (swap! state assoc :applications applications
                        :countries countries
                        )))}))


