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">
5 class="md-toolbar-tools"
7 layout-align="space-between center"
9 <span class="title">{{ vm.title | translate }}</span>
10 <md-button class="md-icon-button" ng-click="vm.closeDialog()">
12 md-font-icon="icon-close"
13 aria-label="Close dialog"
19 <md-dialog-content ms-scroll>
20 <div class="error-list">
22 ng-repeat="error in vm.errors"
25 layout-align="space-between center"
28 <span class="message">{{error.message}}</span>
29 <span class="type">({{error.type}})</span>
31 <md-button class="md-icon-button">
33 md-font-icon="icon-alert-box"
34 aria-label="alert error"
40 <md-input-container class="md-block">
41 <label translate="MAIL.KEY">Key</label>
45 ng-model="vm.mailCannedAnswer.key"
52 ng-messages="mailCannedAnswerForm['key'].$error"
53 ng-show="mailCannedAnswerForm['key'].$touched"
56 <div ng-message="required">
57 <span translate="MAIL.ERRORS.KEY_REQUIRED"
58 >Key field is required</span
63 <div class="md-block">
64 <label class="md-caption grey-fg" translate="MAIL.VALUE">Value</label>
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"
71 <md-input-container class="md-block">
72 <label translate="MAIL.DESCRIPTION">Description</label>
76 ng-model="vm.mailCannedAnswer.description"
80 ng-messages="mailCannedAnswerForm['description'].$error"
81 ng-show="mailCannedAnswerForm['description'].$touched"
84 <div ng-message="required">
85 <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED"
86 >Description field is required</span
92 <div class="error-list">
94 ng-repeat="error in vm.errors"
97 layout-align="space-between center"
100 <span class="message">{{error.message}}</span>
101 <span class="type">({{error.type}})</span>
103 <md-button class="md-icon-button">
105 md-font-icon="icon-alert-box"
106 aria-label="alert error"
116 layout-align="space-between center"
117 ng-if="!vm.crudPermissions.readOnly"
119 <div layout="row" layout-align="start center">
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"
127 translate="MAIL.SAVE"
128 translate-attr-aria-label="MAIL.SAVE"
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"
140 translate="MAIL.ADD_MAILCANNEDANSWER"
141 translate-attr-aria-label="MAIL.ADD_MAILCANNEDANSWER"
148 class="md-icon-button"
149 ng-if="vm.crudPermissions.canDelete && !vm.newMailCannedAnswer"
150 ng-click="vm.deleteMailCannedAnswer($event)"
153 translate-attr-aria-label="MAIL.DELETE"
155 <md-icon md-font-icon="icon-delete"></md-icon>
156 <md-tooltip><span translate="MAIL.DELETE">DELETE</span></md-tooltip>