CSIT Fix for SDC-2585
[sdc.git] / catalog-ui / src / app / view-models / modals / email-modal / email-modal-view.html
1 <!--
2   ~ Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
3   ~
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
7   ~
8   ~      http://www.apache.org/licenses/LICENSE-2.0
9   ~
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.
15 -->
16
17 <ng1-modal modal="modalInstanceEmail" type="classic" class="w-sdc-modal-email modal-type-standard" header="{{emailModalModel.title}}" show-close-button="true">
18     <loader data-display="isLoading"></loader>
19     <form novalidate class="w-sdc-form" name="editForm">
20
21             <div class="i-sdc-form-item" data-ng-class="{'error': validateField(editForm.to)}">
22                 <label class="i-sdc-form-label col-sm-2">To</label>
23                 <div class="col-sm-10">
24                     <input class="i-sdc-form-input" type="text"
25                            data-ng-model="emailModalModel.email.to"
26                            data-ng-model-options="{ debounce: 500 }"
27                            data-ng-maxlength="255"
28                            data-required
29                            name="to"
30                            id="to"
31                            data-ng-disabled="true"
32                         />
33                 </div>
34
35                 <div class="input-error" data-ng-show="validateField(editForm.to)" alignToSelector="#to">
36                     <span ng-show="editForm.to.$error.required" translate="VALIDATION_ERROR_REQUIRED" translate-values="{'field': 'To' }"></span>
37                     <span ng-show="editForm.to.$error.maxlength" translate="VALIDATION_ERROR_MAX_LENGTH" translate-values="{'max': '255' }"></span>
38                     <span ng-show="editForm.to.$error.pattern" translate="VALIDATION_ERROR_SPECIAL_CHARS_NOT_ALLOWED"></span>
39                 </div>
40
41             </div>
42
43             <div class="i-sdc-form-item" data-ng-class="{'error': validateField(editForm.subject)}">
44                 <label class="i-sdc-form-label col-sm-2">Subject</label>
45                 <div class="col-sm-10">
46                     <input class="i-sdc-form-input" type="text"
47                            data-ng-model="emailModalModel.email.subject"
48                            data-ng-model-options="{ debounce: 500 }"
49                            data-ng-maxlength="255"
50                            data-required
51                            name="subject"
52                            data-ng-disabled="true"
53                         />
54                 </div>
55
56                 <div class="input-error" data-ng-show="validateField(editForm.subject)">
57                     <span ng-show="editForm.subject.$error.required" translate="VALIDATION_ERROR_REQUIRED" translate-values="{'field': 'Subject' }"></span>
58                     <span ng-show="editForm.subject.$error.maxlength" translate="VALIDATION_ERROR_MAX_LENGTH" translate-values="{'max': '255' }"></span>
59                     <span ng-show="editForm.subject.$error.pattern" translate="VALIDATION_ERROR_SPECIAL_CHARS_NOT_ALLOWED"></span>
60                 </div>
61
62             </div>
63
64             <div class="i-sdc-form-item" data-ng-class="{'error': validateField(editForm.message)}">
65                 <label class="i-sdc-form-label required col-sm-2">Message</label>
66                 <div class="col-sm-10">
67                         <textarea class="w-sdc-modal-body-email"
68                                   data-ng-model="emailModalModel.email.message"
69                                   placeholder="{{'EMAIL_MODAL_MESSAGE' | translate }}"
70                                   data-required
71                                   name="message"
72                                   data-ng-pattern="commentValidationPattern"
73                                   maxlength="255"
74                                   data-tests-id="changeLifeCycleMessage"
75                                   data-ng-maxlength="255">
76                         </textarea>
77
78                     <div class="input-error" data-ng-show="validateField(editForm.message)">
79                         <span ng-show="editForm.message.$error.required" translate="VALIDATION_ERROR_REQUIRED" translate-values="{'field': 'Message' }"></span>
80                         <span ng-show="editForm.message.$error.maxlength" translate="VALIDATION_ERROR_MAX_LENGTH" translate-values="{'max': '255' }"></span>
81                         <span ng-show="editForm.message.$error.pattern" translate="VALIDATION_ERROR_SPECIAL_CHARS_NOT_ALLOWED"></span>
82                     </div>
83                 </div>
84
85             </div>
86
87     </form>
88
89     <div class="w-sdc-modal-footer classic">
90         <button class="tlv-btn blue" data-tests-id="OK" data-ng-click="submit()" data-ng-disabled="editForm.$invalid">OK</button>
91         <button class="tlv-btn grey" data-tests-id="Cancel" data-ng-click="cancel()" >Cancel</button>
92     </div>
93 </ng1-modal>