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.
17 <div data-ng-if="dataTypes" class="default-value-section i-sdc-form-item">
18 <label class="i-sdc-form-label">Default Value</label>
19 <div data-ng-if="isTypeDataType">
20 <select-fields-structure value-obj-ref="myValue"
21 type-name="property.type"
22 parent-form-obj="forms.editForm"
23 fields-prefix-name="currentPropertyIndex"
25 default-value="{{getDefaultValue()}}"
26 path="{{property.name}}"
27 is-parent-already-input="false"
28 expand-by-default="true"></select-fields-structure>
31 <div data-ng-if="!isTypeDataType" ng-switch="property.type">
32 <div ng-switch-when="map">
34 <select-type-map value-obj-ref="myValue"
35 schema-property="property.schema.property"
36 parent-form-obj="forms.editForm"
37 fields-prefix-name="currentPropertyIndex"
39 default-value="{{getDefaultValue()}}"
40 max-length="maxLength"></select-type-map>
42 <div ng-switch-when="list">
43 <select-type-list value-obj-ref="myValue"
44 schema-property="property.schema.property"
45 parent-form-obj="forms.editForm"
46 fields-prefix-name="currentPropertyIndex"
48 default-value="{{getDefaultValue()}}"
49 max-length="maxLength"></select-type-list>
51 <div ng-switch-default>
52 <div class="i-sdc-form-item" data-ng-class="{error:(forms.editForm.value.$dirty && forms.editForm.value.$invalid)}">
53 <input class="i-sdc-form-input"
54 data-tests-id="defaultvalue"
55 ng-if="!((property.simpleType||property.type) == 'boolean')"
56 data-ng-maxlength="maxLength"
57 data-ng-disabled="isReadOnly"
58 maxlength="{{maxLength}}"
59 data-ng-model="property.value"
62 data-ng-pattern="getValidationPattern((property.simpleType||property.type))"
63 data-ng-model-options="{ debounce: 200 }"
64 data-ng-change="('json'==property.type && forms.editForm.value.$setValidity('pattern', validateJson(property.value)))
65 ||(!forms.editForm.value.$error.pattern && ('integer'==property.type && forms.editForm.value.$setValidity('pattern', validateIntRange(property.value)) || onValueChange()))"
68 <select class="i-sdc-form-select"
69 data-tests-id="booleantype"
70 ng-if="(property.simpleType||property.type) == 'boolean'"
71 data-ng-disabled="isReadOnly"
73 data-ng-change="onValueChange()"
74 data-ng-model="property.value">
75 <option value="true">true</option>
76 <option value="false">false</option>
79 <div class="input-error" data-ng-show="forms.editForm.value.$dirty && forms.editForm.value.$invalid">
80 <span ng-show="forms.editForm.value.$error.required" translate="VALIDATION_ERROR_REQUIRED" translate-values="{'field': 'Property' }"></span>
81 <span ng-show="forms.editForm.value.$error.maxlength" translate="VALIDATION_ERROR_MAX_LENGTH" translate-values="{'max': '{{maxLength}}' }"></span>
82 <span ng-show="forms.editForm.value.$error.pattern" translate="PROPERTY_EDIT_PATTERN"></span>