-
Notifications
You must be signed in to change notification settings - Fork 45
/
numberinput.html
58 lines (57 loc) · 3.61 KB
/
numberinput.html
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2021 Adobe
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
<sly data-sly-use.renderer="${'numberinput.js'}"
data-sly-use.clientlib="${'/libs/granite/sightly/templates/clientlib.html'}"
data-sly-use.label="${renderer.labelPath}"
data-sly-use.shortDescription="${renderer.shortDescriptionPath}"
data-sly-use.errorMessage="${renderer.errorMessagePath}"
data-sly-use.longDescription="${renderer.longDescriptionPath}"
data-sly-use.questionMark="${renderer.questionMarkPath}"
data-sly-use.formstructparser="com.adobe.cq.forms.core.components.models.form.FormStructureParser"
data-sly-use.numberinput="com.adobe.cq.forms.core.components.models.form.NumberInput"></sly>
<div class="cmp-adaptiveform-numberinput"
data-cmp-is="adaptiveFormNumberInput"
data-cmp-visible="${numberinput.visible ? 'true' : 'false'}"
data-cmp-enabled="${numberinput.enabled ? 'true' : 'false'}"
data-cmp-required="${numberinput.required ? 'true': 'false'}"
data-cmp-readonly="${numberinput.readOnly ? 'true' : 'false'}"
id="${numberinput.id}"
data-cmp-adaptiveformcontainer-path="${formstructparser.formContainerPath}"
data-sly-test.widgetId="${'{0}-{1}' @ format=[numberinput.id, 'widget']}">
<div class="cmp-adaptiveform-numberinput__label-container">
<div data-sly-call="${label.label @componentId=widgetId, labelValue=numberinput.label.value, labelVisible=numberinput.label.visible, labelRichText=numberinput.label.richText, bemBlock='cmp-adaptiveform-numberinput'}" data-sly-unwrap></div>
<div data-sly-call="${questionMark.questionMark @componentId=numberinput.id, longDescription=numberinput.description, bemBlock='cmp-adaptiveform-numberinput'}" data-sly-unwrap></div>
</div>
<input
class="cmp-adaptiveform-numberinput__widget"
id="${widgetId}"
title="${numberinput.tooltipVisible ? '' : numberinput.tooltipText}"
type="number"
name="${numberinput.name}"
value="${numberinput.default}"
max="${numberinput.maximum}"
data-cmp-data-layer="${numberinput.data.json}"
min="${numberinput.minimum}"
disabled="${!numberinput.enabled}"
readonly="${numberinput.readOnly}"
required="${numberinput.required}"
placeholder="${numberinput.placeHolder}"
dir="auto"/>
<div data-sly-call="${shortDescription.shortDescription @componentId=numberinput.id, shortDescriptionVisible=numberinput.tooltipVisible, shortDescription=numberinput.tooltip, bemBlock='cmp-adaptiveform-numberinput'}" data-sly-unwrap>
</div>
<div data-sly-call="${longDescription.longDescription @componentId=numberinput.id, longDescription=numberinput.description, bemBlock='cmp-adaptiveform-numberinput'}" data-sly-unwrap></div>
<div data-sly-call="${errorMessage.errorMessage @componentId=numberinput.id, bemBlock='cmp-adaptiveform-numberinput'}" data-sly-unwrap></div>
</div>