e04343adbd52b18a880d9a65e0e9b54a8bf53bf6
[sdc.git] /
1 <sdc-modal modal="modalInstanceName" type="classic" class="w-sdc-modal-resource-instance-name modal-type-confirmation" buttons="footerButtons" header="Instance Name" show-close-button="true">
2
3     <form novalidate class="w-sdc-form" name="forms.editNameForm">
4         <div class="i-sdc-form-item" data-ng-class="{error:(editNameForm.componentInstanceName.$dirty && editNameForm.resourceInstanceName.$invalid)}">
5             <label class="i-sdc-form-label required">Instance Name</label>
6             <input class="w-sdc-modal-resource-instance-input i-sdc-form-input"
7                    name="componentInstanceName"
8                    data-ng-maxlength="50"
9                    data-ng-model="componentInstanceModel.name"
10                    type="text"
11                    data-required
12                    data-ng-pattern="validationPattern"
13                    maxlength="50"
14                    autofocus
15                    placeholder="Enter instance name..."
16                    data-tests-id="instanceName"
17                 />
18
19             <div class="input-error" data-ng-show="forms.editNameForm.componentInstanceName.$dirty && forms.editNameForm.componentInstanceName.$invalid">
20                 <span ng-show="forms.editNameForm.componentInstanceName.$error.required" translate="VALIDATION_ERROR_REQUIRED" translate-values="{'field': 'Resource name' }"></span>
21                 <span ng-show="forms.editNameForm.componentInstanceName.$error.maxlength" translate="VALIDATION_ERROR_MAX_LENGTH" translate-values="{'max': '50' }"></span>
22                 <span ng-show="forms.editNameForm.componentInstanceName.$error.pattern" translate="VALIDATION_ERROR_SPECIAL_CHARS_NOT_ALLOWED"></span>
23             </div>
24
25         </div>
26     </form>
27
28 </sdc-modal>
29
30
31
32 <!--
33
34 <div class="w-sdc-modal w-sdc-modal-resource-instance-name">
35     <header>
36         <div class="w-sdc-modal-head">
37             Instance Name
38         </div>
39     </header>
40     <div>
41         <form novalidate class="w-sdc-modal-body w-sdc-form" name="editNameForm">
42             <div class="i-sdc-form-item" data-ng-class="{error:(editNameForm.componentInstanceName.$dirty && editNameForm.resourceInstanceName.$invalid)}">
43                 <label class="i-sdc-form-label required">Instance Name</label>
44                 <input class="w-sdc-modal-resource-instance-input i-sdc-form-input"
45                        name="componentInstanceName"
46                        data-ng-maxlength="50"
47                        data-ng-model="componentInstanceModel.name"
48                        type="text"
49                        data-required
50                        data-ng-pattern="validationPattern"
51                        maxlength="50"
52                        autofocus
53                        placeholder="Enter instance name..."
54                        data-tests-id="instanceName"
55                     />
56
57                 <div class="input-error" data-ng-show="editNameForm.componentInstanceName.$dirty && editNameForm.componentInstanceName.$invalid">
58                     <span ng-show="editNameForm.componentInstanceName.$error.required" translate="VALIDATION_ERROR_REQUIRED" translate-values="{'field': 'Resource name' }"></span>
59                     <span ng-show="editNameForm.componentInstanceName.$error.maxlength" translate="VALIDATION_ERROR_MAX_LENGTH" translate-values="{'max': '50' }"></span>
60                     <span ng-show="editNameForm.componentInstanceName.$error.pattern" translate="VALIDATION_ERROR_SPECIAL_CHARS_NOT_ALLOWED"></span>
61                 </div>
62
63             </div>
64         </form>
65
66         <div class="w-sdc-modal-action">
67             <button class="w-sdc-btn-blue" data-ng-click="save()" type="button" data-ng-disabled="(!componentInstanceModel.name || componentInstanceModel.name === oldName) || isAlreadyPressed">Ok</button>
68             <button class="w-sdc-btn-dark-gray" data-ng-click="close()" type="button">Cancel</button>
69         </div>
70     </div>
71 </div>
72 -->