fields-listimage.html
2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<script id="tmpl-nf-field-listimage" type="text/template">
<ul aria-describedby="nf-error-{{{ data.id }}}" style="display:grid;grid-row-gap: 5px;grid-column-gap: 5px;">
{{{ data.renderOptions() }}}
</ul>
</script>
<script id='tmpl-nf-field-listimage-option' type='text/template'>
<# if ( ! data.visible ) { return '' } #>
<li style="{{{data.styles}}} vertical-align:top;">
<input type="{{{data.image_type}}}" id="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}" name="nf-field-{{{ data.fieldID }}}" class="{{{ data.classes }}} nf-element {{{ ( data.isSelected ) ? ' nf-checked' : '' }}}" value="{{{ _.escape( data.value ) }}}" {{{ ( data.isSelected ) ? 'checked="checked"' : '' }}}
aria-labelledby="nf-label-field-{{{ data.fieldID }}}-{{{ data.index }}}"
<# if( data.required ) { #>
required
<# } #>
>
<label for="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}"
id="nf-label-field-{{{ data.fieldID }}}-{{{ data.index }}}"
class="{{{ ( data.isSelected ) ? 'nf-checked-label' : '' }}}">{{{ ( data.maybeFilterHTML() === 'true' ) ? _.escape( data.label ) : data.label }}}
<img src="{{{data.image}}}" alt="{{{data.alt_text}}}" title="{{{data.img_title}}}" style="max-width: 100%;height: auto;"/>
</label>
</li>
</script>
<script id='tmpl-nf-field-listimage-other' type='text/template'>
<li {{{ ( ! data.visible ) ? 'style="display:none"' : '' }}}>
<input type="{{{data.image_type}}}"
id="nf-field-{{{ data.fieldID }}}-other"
name="nf-field-{{{ data.fieldID }}}" class="{{{ data.classes }}} nf-element" value="nf-other" {{{ ( ! data.valueFound ) ? 'checked="checked"' : '' }}}
aria-labelledby="nf-label-field-{{{ data.fieldID }}}-other"
<# if( data.required ) { #>
required
<# } #>
>
<label id="nf-label-field-{{{ data.fieldID }}}-other">Other
{{{ data.renderOtherText() }}}
</label>
</li>
</script>
<script id='tmpl-nf-field-listimage-other-text' type='text/template'>
<input type="text" name="nf-field-{{{ data.fieldID }}}" class="nf-element" value="{{{ data.currentValue }}}">
</script>