aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/modals/email-modal/email-modal-view.html
blob: bf65428033f4223a6f470f3c31d1b6e468d2416d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<sdc-modal modal="modalInstanceEmail" type="classic" class="w-sdc-modal-email modal-type-standard" header="{{emailModalModel.title}}" show-close-button="true">
    <loader data-display="isLoading"></loader>
    <form novalidate class="w-sdc-form" name="editForm">

            <div class="i-sdc-form-item" data-ng-class="{'error': validateField(editForm.to)}">
                <label class="i-sdc-form-label col-sm-2">To</label>
                <div class="col-sm-10">
                    <input class="i-sdc-form-input" type="text"
                           data-ng-model="emailModalModel.email.to"
                           data-ng-model-options="{ debounce: 500 }"
                           data-ng-maxlength="255"
                           data-required
                           name="to"
                           id="to"
                           data-ng-disabled="true"
                        />
                </div>

                <div class="input-error" data-ng-show="validateField(editForm.to)" alignToSelector="#to">
                    <span ng-show="editForm.to.$error.required" translate="VALIDATION_ERROR_REQUIRED" translate-values="{'field': 'To' }"></span>
                    <span ng-show="editForm.to.$error.maxlength" translate="VALIDATION_ERROR_MAX_LENGTH" translate-values="{'max': '255' }"></span>
                    <span ng-show="editForm.to.$error.pattern" translate="VALIDATION_ERROR_SPECIAL_CHARS_NOT_ALLOWED"></span>
                </div>

            </div>

            <div class="i-sdc-form-item" data-ng-class="{'error': validateField(editForm.subject)}">
                <label class="i-sdc-form-label col-sm-2">Subject</label>
                <div class="col-sm-10">
                    <input class="i-sdc-form-input" type="text"
                           data-ng-model="emailModalModel.email.subject"
                           data-ng-model-options="{ debounce: 500 }"
                           data-ng-maxlength="255"
                           data-required
                           name="subject"
                           data-ng-disabled="true"
                        />
                </div>

                <div class="input-error" data-ng-show="validateField(editForm.subject)">
                    <span ng-show="editForm.subject.$error.required" translate="VALIDATION_ERROR_REQUIRED" translate-values="{'field': 'Subject' }"></span>
                    <span ng-show="editForm.subject.$error.maxlength" translate="VALIDATION_ERROR_MAX_LENGTH" translate-values="{'max': '255' }"></span>
                    <span ng-show="editForm.subject.$error.pattern" translate="VALIDATION_ERROR_SPECIAL_CHARS_NOT_ALLOWED"></span>
                </div>

            </div>

            <div class="i-sdc-form-item" data-ng-class="{'error': validateField(editForm.message)}">
                <label class="i-sdc-form-label required col-sm-2">Message</label>
                <div class="col-sm-10">
                        <textarea class="w-sdc-modal-body-email"
                                  data-ng-model="emailModalModel.email.message"
                                  placeholder="{{'EMAIL_MODAL_MESSAGE' | translate }}"
                                  data-required
                                  name="message"
                                  data-ng-pattern="commentValidationPattern"
                                  maxlength="255"
                                  data-tests-id="changeLifeCycleMessage"
                                  data-ng-maxlength="255">
                        </textarea>

                    <div class="input-error" data-ng-show="validateField(editForm.message)">
                        <span ng-show="editForm.message.$error.required" translate="VALIDATION_ERROR_REQUIRED" translate-values="{'field': 'Message' }"></span>
                        <span ng-show="editForm.message.$error.maxlength" translate="VALIDATION_ERROR_MAX_LENGTH" translate-values="{'max': '255' }"></span>
                        <span ng-show="editForm.message.$error.pattern" translate="VALIDATION_ERROR_SPECIAL_CHARS_NOT_ALLOWED"></span>
                    </div>
                </div>

            </div>

    </form>

    <div class="w-sdc-modal-footer classic">
        <button class="tlv-btn blue" data-tests-id="OK" data-ng-click="submit()" data-ng-disabled="editForm.$invalid">OK</button>
        <button class="tlv-btn grey" data-tests-id="Cancel" data-ng-click="cancel()" >Cancel</button>
    </div>
</sdc-modal>