-
Notifications
You must be signed in to change notification settings - Fork 6
/
form.ejs
30 lines (30 loc) · 1.32 KB
/
form.ejs
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
<div class="mb-2 card border">
{% if (!ctx.component.hideLabel || ctx.builder || ctx.component.collapsible || ctx.component.tooltip) { %}
<div class="card-header {{ctx.transform('class', 'bg-' + ctx.component.theme)}}"
{% if (ctx.component.collapsible) { %}
tabindex="0"
{% } %}
role="button"
aria-expanded="{{ctx.component.collapsible ? !ctx.collapsed : true}}"
aria-controls="{{ctx.instance.id}}-{{ctx.component.key}}"
ref="header"
>
<span class="mb-0 card-title {% if (ctx.component.theme && ctx.component.theme !== 'default') { %}text-light{% } %}">
{% if (ctx.component.collapsible) { %}
<i class="formio-collapse-icon {{ctx.iconClass(ctx.collapsed ? 'plus-square-o' : 'minus-square-o')}} text-muted" data-title="Collapse Panel"></i>
{% } %}
{% if (!ctx.component.hideLabel || ctx.builder) { %}
{{ctx.t(ctx.component.title, { _userInput: true })}}
{% } %}
{% if (ctx.component.tooltip) { %}
<i ref="tooltip" tabindex="0" class="{{ctx.iconClass('question-sign')}} text-muted" data-tooltip="{{ctx.component.tooltip}}"></i>
{% } %}
</span>
</div>
{% } %}
{% if (!ctx.collapsed || ctx.builder) { %}
<div class="card-body" ref="{{ctx.nestedKey}}" id="{{ctx.instance.id}}-{{ctx.component.key}}">
{{ctx.children}}
</div>
{% } %}
</div>