 (ns hatti.ona.forms
   (:require [chimera.js-interop :refer [format]]
             [chimera.urls :refer [last-url-param]]
+            [ona.utils.urls :as urls]
+            [ona.utils.i18n :refer [translate]]
             [chimera.date :as chimera-date]
             [cljs.pprint :refer [cl-format]]
             [clojure.string :as string]
             [hatti.constants :refer [_submission_time
                                      _submitted_by
                                      _last_edited
-                                     _id]]))
+                                     _id
+                                     _media_all_received]]))
 
 ;; CONSTANTS
 (def currency-regex #"£|$")

  (and (string? appearance-value)
       (re-matches #"^search\(.*\)$" appearance-value)))

(defn format-answer
  "String representation for a particular field datapoint (answer).
   re-formatting depends on field type, eg. name->label substitution.
   Optional: compact? should be true if a short string needs to be returned."
  [field answer & {:keys [language compact? label field-key]
                   :or {field-key :name}}]
  (cond
    (string/blank? answer) no-answer
    (select-one? field) (let [option (->> (:children field)

                            "instanceID"
                            "__version__"
                            "_duration"
                            "_submitted_by"
                            "_media_all_received"}
                          field)
      (field-type-in-set? #{"deviceid"
                            "end"
