2 ~ Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
4 ~ Licensed under the Apache License, Version 2.0 (the "License");
5 ~ you may not use this file except in compliance with the License.
6 ~ You may obtain a copy of the License at
8 ~ http://www.apache.org/licenses/LICENSE-2.0
10 ~ Unless required by applicable law or agreed to in writing, software
11 ~ distributed under the License is distributed on an "AS IS" BASIS,
12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ~ See the License for the specific language governing permissions and
14 ~ limitations under the License.
16 <div data-ng-if="dataTypes" class="default-value-section i-sdc-form-item">
17 <label class="i-sdc-form-label">Default Value</label>
18 <div data-ng-if="isTypeDataType">
19 <select-fields-structure value-obj-ref="myValue"
20 type-name="property.type"
21 parent-form-obj="forms.editForm"
22 fields-prefix-name="currentPropertyIndex"
24 default-value="{{getDefaultValue()}}"
25 path="{{property.name}}"
26 is-parent-already-input="false"
27 expand-by-default="true"></select-fields-structure>
30 <div data-ng-if="!isTypeDataType" ng-switch="property.type">
31 <div ng-switch-when="map">
33 <select-type-map value-obj-ref="myValue"
34 schema-property="property.schema.property"
35 parent-form-obj="forms.editForm"
36 fields-prefix-name="currentPropertyIndex"
38 default-value="{{getDefaultValue()}}"
39 max-length="maxLength"></select-type-map>
41 <div ng-switch-when="list">
42 <select-type-list value-obj-ref="myValue"
43 schema-property="property.schema.property"
44 parent-form-obj="forms.editForm"
45 fields-prefix-name="currentPropertyIndex"
47 default-value="{{getDefaultValue()}}"
48 max-length="maxLength"></select-type-list>
50 <div ng-switch-default>
51 <div class="i-sdc-form-item" data-ng-class="{error:(forms.editForm.value.$dirty && forms.editForm.value.$invalid)}">
52 <input class="i-sdc-form-input"
53 data-tests-id="defaultvalue"
54 ng-if="!((property.simpleType||property.type) == 'boolean')"
55 data-ng-maxlength="maxLength"
56 data-ng-disabled="isReadOnly"
57 maxlength="{{maxLength}}"
58 data-ng-model="property.value"
61 data-ng-pattern="getValidationPattern((property.simpleType||property.type))"
62 data-ng-model-options="{ debounce: 200 }"
63 data-ng-change="('json'==property.type && forms.editForm.value.$setValidity('pattern', validateJson(property.value)))
64 ||(!forms.editForm.value.$error.pattern && ('integer'==property.type && forms.editForm.value.$setValidity('pattern', validateIntRange(property.value)) || onValueChange()))"
67 <select class="i-sdc-form-select"
68 data-tests-id="booleantype"
69 ng-if="(property.simpleType||property.type) == 'boolean'"
70 data-ng-disabled="isReadOnly"
72 data-ng-change="onValueChange()"
73 data-ng-model="property.value">
74 <option value="true">true</option>
75 <option value="false">false</option>
78 <div class="input-error" data-ng-show="forms.editForm.value.$dirty && forms.editForm.value.$invalid">
79 <span ng-show="forms.editForm.value.$error.required" translate="VALIDATION_ERROR_REQUIRED" translate-values="{'field': 'Property' }"></span>
80 <span ng-show="forms.editForm.value.$error.maxlength" translate="VALIDATION_ERROR_MAX_LENGTH" translate-values="{'max': '{{maxLength}}' }"></span>
81 <span ng-show="forms.editForm.value.$error.pattern" translate="PROPERTY_EDIT_PATTERN"></span>