                  :on-click #(do
                               (.preventDefault %)
                               (ajax/POST
-                               (path-for (str "/obpv1/admin/close_ticket/" id))
-                               {:response-format :json
-                                :keywords? true
-                                :params {:new-status (if open? "closed" "open")}
-                                :handler (fn [data]
-                                           (if open?
-                                             (init-data state)
-                                             (get-closed-tickets state))
-                                           )
-                                :error-handler (fn [{:keys [status status-text]}])}))}
+                                (path-for (str "/obpv1/admin/close_ticket/" id))
+                                {:response-format :json
+                                 :keywords? true
+                                 :params {:new-status (if open? "closed" "open")}
+                                 :handler (fn [data]
+                                            (if open?
+                                              (init-data state)
+                                              (get-closed-tickets state))
+                                            )
+                                 :error-handler (fn [{:keys [status status-text]}])}))}
         (if open? (t :admin/Done) (t :admin/Restore))]]]]))
 
 (defn ticket-visible? [element state]
   (if (or (> (count
-              (intersection
-               (into #{} (:types-selected @state))
-               #{(:report_type element)}))
+               (intersection
+                 (into #{} (:types-selected @state))
+                 #{(:report_type element)}))
              0)
           (= (:types-all @state)
              true))

       [:h3 {:class "media-heading"}
        [:u (t (keyword (str "admin/" report_type)))]]
       [:h4 {:class "media-heading"}
        [:a {:href item_url :target "_blank"}
         (str (t (keyword (str "admin/" item_type))) " - " item_name)]]]
      [:div.media-descriprtion
       [:div {:class "col-xs-12"  :id (if open? "" "closed")}
        [:div [:label (str (t :admin/Description) ": ")] " " (if (< 130 (count description)) [text-shorter description 130]   description) ]

(defn ticket-modal [state]
  [:div
   [:div.modal-header
    [:button {:type         "button"
              :class        "close"
              :data-dismiss "modal"
              :aria-label   "OK"}
     [:span {:aria-hidden             "true"
             :dangerouslySetInnerHTML {:__html "&times;"}}]]
    [:h4 {:class "modal-title"} (t :admin/Sendmessagetoreporter)]]
   [:div.modal-body
    (ticket-modal-container state)
    ]])

(defn get-closed-tickets [state]
  (ajax/GET
    (path-for "/obpv1/admin/closed_tickets/")
    {:handler (fn [tickets]
                (swap! state assoc :tickets tickets))}))

(defn init-data [state]
  (ajax/GET
    (path-for "/obpv1/admin/tickets/")
    {:handler (fn [tickets]
                (swap! state assoc :tickets tickets))}))

(defn open-ticket-modal [user-id name gallery-state init-data]
  (let [state (atom {:mail          {:subject ""
