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 <ng1-modal modal="modalInstanceName" type="classic" class="w-sdc-modal-resource-instance-name modal-type-confirmation" buttons="footerButtons" header="Instance Name" show-close-button="true">
19 <form novalidate class="w-sdc-form" name="forms.editNameForm">
20 <div class="i-sdc-form-item" data-ng-class="{error:(editNameForm.componentInstanceName.$dirty && editNameForm.resourceInstanceName.$invalid)}">
21 <label class="i-sdc-form-label required">Instance Name</label>
22 <input class="w-sdc-modal-resource-instance-input i-sdc-form-input"
23 name="componentInstanceName"
24 data-ng-maxlength="50"
25 data-ng-model="componentInstanceModel.name"
28 data-ng-pattern="validationPattern"
31 placeholder="Enter instance name..."
32 data-tests-id="instanceName"
35 <div class="input-error" data-ng-show="forms.editNameForm.componentInstanceName.$dirty && forms.editNameForm.componentInstanceName.$invalid">
36 <span ng-show="forms.editNameForm.componentInstanceName.$error.required" translate="VALIDATION_ERROR_REQUIRED" translate-values="{'field': 'Resource name' }"></span>
37 <span ng-show="forms.editNameForm.componentInstanceName.$error.maxlength" translate="VALIDATION_ERROR_MAX_LENGTH" translate-values="{'max': '50' }"></span>
38 <span ng-show="forms.editNameForm.componentInstanceName.$error.pattern" translate="VALIDATION_ERROR_SPECIAL_CHARS_NOT_ALLOWED"></span>
50 <div class="w-sdc-modal w-sdc-modal-resource-instance-name">
52 <div class="w-sdc-modal-head">
57 <form novalidate class="w-sdc-modal-body w-sdc-form" name="editNameForm">
58 <div class="i-sdc-form-item" data-ng-class="{error:(editNameForm.componentInstanceName.$dirty && editNameForm.resourceInstanceName.$invalid)}">
59 <label class="i-sdc-form-label required">Instance Name</label>
60 <input class="w-sdc-modal-resource-instance-input i-sdc-form-input"
61 name="componentInstanceName"
62 data-ng-maxlength="50"
63 data-ng-model="componentInstanceModel.name"
66 data-ng-pattern="validationPattern"
69 placeholder="Enter instance name..."
70 data-tests-id="instanceName"
73 <div class="input-error" data-ng-show="editNameForm.componentInstanceName.$dirty && editNameForm.componentInstanceName.$invalid">
74 <span ng-show="editNameForm.componentInstanceName.$error.required" translate="VALIDATION_ERROR_REQUIRED" translate-values="{'field': 'Resource name' }"></span>
75 <span ng-show="editNameForm.componentInstanceName.$error.maxlength" translate="VALIDATION_ERROR_MAX_LENGTH" translate-values="{'max': '50' }"></span>
76 <span ng-show="editNameForm.componentInstanceName.$error.pattern" translate="VALIDATION_ERROR_SPECIAL_CHARS_NOT_ALLOWED"></span>
82 <div class="w-sdc-modal-action">
83 <button class="w-sdc-btn-blue" data-ng-click="save()" type="button" data-ng-disabled="(!componentInstanceModel.name || componentInstanceModel.name === oldName) || isAlreadyPressed">Ok</button>
84 <button class="w-sdc-btn-dark-gray" data-ng-click="close()" type="button">Cancel</button>