added onblur listener and br
This commit is contained in:
parent
d66189bd9f
commit
d34d7a7ce5
1 changed files with 17 additions and 13 deletions
|
@ -83,13 +83,18 @@
|
||||||
label]
|
label]
|
||||||
{:type :element :attrs {:for id-for :class "form-label"} :tag :label :content [label]})
|
{:type :element :attrs {:for id-for :class "form-label"} :tag :label :content [label]})
|
||||||
|
|
||||||
|
(defn generate-br
|
||||||
|
[]
|
||||||
|
{:type :element, :attrs nil, :tag :br, :content nil})
|
||||||
|
|
||||||
(defn generate-input-field
|
(defn generate-input-field
|
||||||
[id
|
[id
|
||||||
label
|
label
|
||||||
default-value]
|
default-value]
|
||||||
[(generate-label id label)
|
[(generate-label id label)
|
||||||
{:type :element :attrs {:class "form-control" :type "text" :name id :value default-value} :tag :input :content nil}
|
{:type :element :attrs {:class "form-control" :type "text" :name id :value default-value :onblur "dda.c4k_jira.browser.validate_all_BANG_ ()"} :tag :input :content nil}
|
||||||
(generate-feedback-tag id)])
|
(generate-feedback-tag id)
|
||||||
|
(generate-br)])
|
||||||
|
|
||||||
(defn generate-text-area
|
(defn generate-text-area
|
||||||
[id
|
[id
|
||||||
|
@ -97,27 +102,26 @@
|
||||||
default-value
|
default-value
|
||||||
rows]
|
rows]
|
||||||
[(generate-label id label)
|
[(generate-label id label)
|
||||||
{:type :element :attrs {:name id :id id :class "form-control" :rows rows} :tag :textarea :content [default-value]}
|
{:type :element :attrs {:name id :id id :class "form-control" :rows rows :onblur "dda.c4k_jira.browser.validate_all_BANG_ ()"} :tag :textarea :content [default-value]}
|
||||||
(generate-feedback-tag id)])
|
(generate-feedback-tag id)
|
||||||
|
(generate-br)])
|
||||||
|
|
||||||
(defn generate-button
|
(defn generate-button
|
||||||
[id
|
[id
|
||||||
label]
|
label]
|
||||||
{:type :element
|
[{:type :element
|
||||||
:attrs {:type "button", :id id, :class "btn btn-primary"}
|
:attrs {:type "button", :id id, :class "btn btn-primary" :onblur "dda.c4k_jira.browser.validate_all_BANG_ ()"}
|
||||||
:tag :button
|
:tag :button
|
||||||
:content [label]})
|
:content [label]}
|
||||||
|
(generate-br)])
|
||||||
(defn generate-br
|
|
||||||
[]
|
|
||||||
{:type :element, :attrs nil, :tag :br, :content nil})
|
|
||||||
|
|
||||||
(defn generate-output
|
(defn generate-output
|
||||||
[id
|
[id
|
||||||
label
|
label
|
||||||
rows]
|
rows]
|
||||||
{:type :element, :attrs {:id id}, :tag :div, :content [{:type :element, :attrs {:for "output", :class "form-label"}, :tag :label, :content [label]}
|
[{:type :element, :attrs {:id id}, :tag :div, :content [{:type :element, :attrs {:for "output", :class "form-label"}, :tag :label, :content [label]}
|
||||||
{:type :element, :attrs {:name "output", :id "output", :class "form-control", :rows rows}, :tag :textarea, :content []}]})
|
{:type :element, :attrs {:name "output", :id "output", :class "form-control", :rows rows}, :tag :textarea, :content []}]}
|
||||||
|
(generate-br)])
|
||||||
|
|
||||||
(defn generate-needs-validation
|
(defn generate-needs-validation
|
||||||
[]
|
[]
|
||||||
|
|
Loading…
Reference in a new issue