    #_[signature-component]
 
    [:div
-   (input "first name" :text :person.first-name)
-   [:div.row
-    [:div.col-md-2]
-    [:div.col-md-5
-     [:div.alert.alert-danger
-      {:field :alert :id :errors.first-name}]]]
-
-   (input "last name" :text :person.last-name)
-   [:div.row
-    [:div.col-md-2]
-    [:div.col-md-5
-     [:div.alert.alert-success
-      {:field :alert :id :person.last-name :event empty?}
-      "last name is empty!"]]]
-
-   [:div.form-group
-    [:label "age"]
-    [:select.form-control {:field :list :id :person.age}
-     [:option {:key :17-} "17-"]
-     [:option {:key :18-24} "18-24"]
-     [:option {:key :25-29} "25-29"]
-     [:option {:key :30-34} "30-34"]
-     [:option {:key :35-39} "35-39"]
-     [:option {:key :40-44} "40-44"]
-     [:option {:key :45-49} "45-49"]
-     [:option {:key :50-54} "50-54"]
-     [:option {:key :55-59} "55-59"]
-     [:option {:key :60-64} "60-64"]
-     [:option {:key :65-69} "65-69"]
-     [:option {:key :70-74} "70-74"]
-     [:option {:key :75-79} "75-79"]
-     [:option {:key :80-84} "80-84"]
-     [:option {:key :85+} "85+"]]]
-
-   (input "email" :email :person.email)
-   [:div.row
-    [:div.col-md-2]
-    [:div.col-md-5
-     [:div.alert.alert-danger
-      {:field :alert :id :errors.email :event empty?}
-      "email is empty!"]]]
+    (input "first name" :text :person.first-name)
+    [:div.row
+     [:div.col-md-2]
+     [:div.col-md-5
+      [:div.alert.alert-danger
+       {:field :alert :id :errors.first-name}]]]
+
+    (input "last name" :text :person.last-name)
+    [:div.row
+     [:div.col-md-2]
+     [:div.col-md-5
+      [:div.alert.alert-success
+       {:field :alert :id :person.last-name :event empty?}
+       "last name is empty!"]]]
+
+    [:div.form-group
+     [:label "age"]
+     [:select.form-control {:field :list :id :person.age}
+      (for [a age-groups]
+        [:option {:value a :key a} (name a)])]]
+
+    (input "email" :email :person.email)
+    [:div.row
+     [:div.col-md-2]
+     [:div.col-md-5
+      [:div.alert.alert-danger
+       {:field :alert :id :errors.email :event empty?}
+       "email is empty!"]]]
 
     (radios-yes-no
      "I want to get noticed about my supported ideas progress."

   [:div.col
    [:input.form-control {:field type :id id :placeholder label}]]])

(defn friend-source [text]
  (filter
   #(-> % (.toLowerCase %) (.indexOf text) (> -1))
   ["Alice" "Alan" "Bob" "Beth" "Jim" "Jane" "Kim" "Rob" "Zoe"]))


;;; COMPONENTS

(defn select-districts-component []
  [:div.btn-group {:field :multi-select :id :every.position}
   (for [d @app-districts]
     [:button.btn.btn-default {:key (keyword d)} d])])

(defn select-cat-component []
    [:div.form-group
     [:select.form-control {:field :list :id :idea.category}
      [:option
       {:value "" :disabled "disabled" :selected "selected"}
       "Pick a category..."]
      (for [c @app-cats]
        [:option {:key (keyword c)} c])]])

(defn list-idea-blocks-component []
  nil)

(defn add-idea-component []
    [:div
     (input-placeholder "Add your idea" :text :idea.idea) ;; should we put just name instead of id ?
     [select-cat-component]
     [:p
      [:textarea.form-control
       {:rows "4" :placeholder "If necessary, add a description"}]]
     (input-placeholder "Add a reference URL" :text :idea.url.1)
     (input-placeholder "Add a reference URL" :text :idea.url.2)
     (input-placeholder "Add a reference URL" :text :idea.url.3)
     [:button.btn.btn-default
      #_{:on-click #(handle-add-idea)}
      "Add"]])

(defn signature-component []
  nil)

;;; TEMPLATE

(def form-template
  [:div

   [select-districts-component]

   [:h3 "2. Check ideas you want to support!"]
   [list-idea-blocks-component]

   [:hr]
   [:p [:em "When 'add an idea' input field is clicked:"]]
