LT-253: Creating dynamic form components

This commit is contained in:
Bruno Alves de Faria authored and Erik Ziegler committed 2016-07-22 11:12:04 +02:00
1 parent 88f737644f
commit cb875b1913
72 files changed
+1169 -126

No files matched your search

@@ -0,0 +1,20 @@
<template name="groupRadio">
{{#group (extend this
class=(concat 'form-group ' this.class)
wrappers=(concat ''
this.wrappers
(valueIf reactive this.label 'wrapperTitle ' '')
)
)}}
{{>UI.contentBlock}}
{{#each item in (reactive this.items)}}
{{>inputRadio
class=this.radioClass
name=this.key
value=item.value
label=item.label
checked=(eq item.value (reactive this.value))
}}
{{/each}}
{{/group}}
</template>
@@ -0,0 +1,14 @@
<template name="inputRadio">
{{#baseComponent (extend this
base='baseInput'
mixins=(concat 'input ' this.mixins)
labelAfter=(valueIf (isDefined this.labelAfter) this.labelAfter true)
labelClass=(concat 'checkboxLabel' this.labelClass)
wrappers=(concat ''
this.wrappers
(valueIf reactive this.label 'wrapperLabel ' '')
)
)}}
{{>UI.contentBlock}}
{{/baseComponent}}
</template>
@@ -0,0 +1,13 @@
<template name="inputSelect">
{{#baseComponent (extend this
base='baseSelect'
class=(concat 'form-control ' this.class)
mixins=(concat 'select ' this.mixins)
wrappers=(concat ''
this.wrappers
(valueIf reactive this.label 'wrapperLabel ' '')
)
)}}
{{>UI.contentBlock}}
{{/baseComponent}}
</template>
@@ -0,0 +1,13 @@
<template name="inputText">
{{#baseComponent (extend this
base='baseInput'
class=(concat 'form-control ' this.class)
mixins=(concat 'input ' this.mixins)
wrappers=(concat ''
this.wrappers
(valueIf reactive this.label 'wrapperLabel ' '')
)
)}}
{{>UI.contentBlock}}
{{/baseComponent}}
</template>