609b5c4803816531f96df35ca627093150421f03
[motion-next.git] /
1 <md-dialog class="mailCannedAnswer-dialog" aria-label="New MailCannedAnswer">
2   <form name="mailCannedAnswerForm" class="md-inline-form" novalidate>
3     <md-toolbar class="md-accent md-hue-2">
4       <div
5         class="md-toolbar-tools"
6         layout="row"
7         layout-align="space-between center"
8       >
9         <span class="title">{{ vm.title | translate }}</span>
10         <md-button class="md-icon-button" ng-click="vm.closeDialog()">
11           <md-icon
12             md-font-icon="icon-close"
13             aria-label="Close dialog"
14           ></md-icon>
15         </md-button>
16       </div>
17     </md-toolbar>
18
19     <md-dialog-content ms-scroll>
20       <div class="error-list">
21         <div
22           ng-repeat="error in vm.errors"
23           class="error"
24           layout="row"
25           layout-align="space-between center"
26         >
27           <div>
28             <span class="message">{{error.message}}</span>
29             <span class="type">({{error.type}})</span>
30           </div>
31           <md-button class="md-icon-button">
32             <md-icon
33               md-font-icon="icon-alert-box"
34               aria-label="alert error"
35               class="s16"
36             ></md-icon>
37           </md-button>
38         </div>
39       </div>
40       <md-input-container class="md-block">
41         <label translate="MAIL.KEY">Key</label>
42         <input
43           type=""
44           name="key"
45           ng-model="vm.mailCannedAnswer.key"
46           md-maxlength="255"
47           ng-required="true"
48           autofocus
49         />
50
51         <div
52           ng-messages="mailCannedAnswerForm['key'].$error"
53           ng-show="mailCannedAnswerForm['key'].$touched"
54           role="alert"
55         >
56           <div ng-message="required">
57             <span translate="MAIL.ERRORS.KEY_REQUIRED"
58               >Key field is required</span
59             >
60           </div>
61         </div>
62       </md-input-container>
63       <div class="md-block">
64         <label class="md-caption grey-fg" translate="MAIL.VALUE">Value</label>
65         <textarea
66           aria-label="Value value"
67           ckeditor="{ skin: 'office2013', language: 'en', allowedContent: true, extraPlugins: 'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64', toolbarGroups: [{ name: 'styles', groups: ['styles'] }, { name: 'clipboard', groups: ['undo'] }, { name: 'colors', groups: ['colors'] }, { name: 'basicstyles', groups: ['basicstyles'] }, { name: 'paragraph', groups: ['list', 'indent', 'align'] }, { name: 'mode' }], autocorrect_enabled: true, disableNativeSpellChecker: false, fontSize_sizes: '8/8pt;9/9pt;10/10pt;11/11pt;12/12pt;14/14pt;16/16pt;18/18pt;20/20pt;22/22pt;24/24pt;26/26pt;28/28pt;36/36pt;48/48pt;72/72pt',  removePlugins: 'magicline' }"
68           ng-model="vm.mailCannedAnswer.value"
69         ></textarea>
70       </div>
71       <md-input-container class="md-block">
72         <label translate="MAIL.DESCRIPTION">Description</label>
73         <input
74           type="text"
75           name="description"
76           ng-model="vm.mailCannedAnswer.description"
77         />
78
79         <div
80           ng-messages="mailCannedAnswerForm['description'].$error"
81           ng-show="mailCannedAnswerForm['description'].$touched"
82           role="alert"
83         >
84           <div ng-message="required">
85             <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED"
86               >Description field is required</span
87             >
88           </div>
89         </div>
90       </md-input-container>
91
92       <div class="error-list">
93         <div
94           ng-repeat="error in vm.errors"
95           class="error"
96           layout="row"
97           layout-align="space-between center"
98         >
99           <div>
100             <span class="message">{{error.message}}</span>
101             <span class="type">({{error.type}})</span>
102           </div>
103           <md-button class="md-icon-button">
104             <md-icon
105               md-font-icon="icon-alert-box"
106               aria-label="alert error"
107               class="s16"
108             ></md-icon>
109           </md-button>
110         </div>
111       </div>
112     </md-dialog-content>
113
114     <md-dialog-actions
115       layout="row"
116       layout-align="space-between center"
117       ng-if="!vm.crudPermissions.readOnly"
118     >
119       <div layout="row" layout-align="start center">
120         <md-button
121           type="submit"
122           ng-if="vm.crudPermissions.canEdit && !vm.newMailCannedAnswer"
123           ng-click="vm.saveMailCannedAnswer()"
124           class="send-button md-accent md-raised"
125           ng-disabled="mailCannedAnswerForm.$invalid || mailCannedAnswerForm.$pristine"
126           aria-label="SAVE"
127           translate="MAIL.SAVE"
128           translate-attr-aria-label="MAIL.SAVE"
129         >
130           SAVE
131         </md-button>
132
133         <md-button
134           type="submit"
135           ng-if="vm.crudPermissions.canEdit && vm.newMailCannedAnswer"
136           ng-click="vm.addNewMailCannedAnswer()"
137           class="send-button md-accent md-raised"
138           ng-disabled="mailCannedAnswerForm.$invalid"
139           aria-label="ADD"
140           translate="MAIL.ADD_MAILCANNEDANSWER"
141           translate-attr-aria-label="MAIL.ADD_MAILCANNEDANSWER"
142         >
143           ADD MAILCANNEDANSWER
144         </md-button>
145       </div>
146       <div layout="row">
147         <md-button
148           class="md-icon-button"
149           ng-if="vm.crudPermissions.canDelete && !vm.newMailCannedAnswer"
150           ng-click="vm.deleteMailCannedAnswer($event)"
151           aria-label="DELETE"
152           translate
153           translate-attr-aria-label="MAIL.DELETE"
154         >
155           <md-icon md-font-icon="icon-delete"></md-icon>
156           <md-tooltip><span translate="MAIL.DELETE">DELETE</span></md-tooltip>
157         </md-button>
158       </div>
159     </md-dialog-actions>
160   </form>
161 </md-dialog>