2 class="openchannelCannedAnswer-dialog"
3 aria-label="New OpenchannelCannedAnswer"
5 <form name="openchannelCannedAnswerForm" class="md-inline-form" novalidate>
6 <md-toolbar class="md-accent md-hue-2">
8 class="md-toolbar-tools"
10 layout-align="space-between center"
12 <span class="title">{{ vm.title | translate }}</span>
13 <md-button class="md-icon-button" ng-click="vm.closeDialog()">
15 md-font-icon="icon-close"
16 aria-label="Close dialog"
22 <md-dialog-content ms-scroll>
23 <div class="error-list">
25 ng-repeat="error in vm.errors"
28 layout-align="space-between center"
31 <span class="message">{{error.message}}</span>
32 <span class="type">({{error.type}})</span>
34 <md-button class="md-icon-button">
36 md-font-icon="icon-alert-box"
37 aria-label="alert error"
43 <md-input-container class="md-block">
44 <label translate="OPENCHANNEL.KEY">Key</label>
48 ng-model="vm.openchannelCannedAnswer.key"
55 ng-messages="openchannelCannedAnswerForm['key'].$error"
56 ng-show="openchannelCannedAnswerForm['key'].$touched"
59 <div ng-message="required">
60 <span translate="OPENCHANNEL.ERRORS.KEY_REQUIRED"
61 >Key field is required</span
66 <md-input-container class="md-block">
67 <label translate="OPENCHANNEL.VALUE">Value</label>
70 ng-model="vm.openchannelCannedAnswer.value"
75 ng-messages="openchannelCannedAnswerForm['value'].$error"
76 ng-show="openchannelCannedAnswerForm['value'].$touched"
79 <div ng-message="required">
80 <span translate="OPENCHANNEL.ERRORS.VALUE_REQUIRED"
81 >Value field is required</span
86 <md-input-container class="md-block">
87 <label translate="OPENCHANNEL.DESCRIPTION">Description</label>
91 ng-model="vm.openchannelCannedAnswer.description"
95 ng-messages="openchannelCannedAnswerForm['description'].$error"
96 ng-show="openchannelCannedAnswerForm['description'].$touched"
99 <div ng-message="required">
100 <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED"
101 >Description field is required</span
105 </md-input-container>
107 <div class="error-list">
109 ng-repeat="error in vm.errors"
112 layout-align="space-between center"
115 <span class="message">{{error.message}}</span>
116 <span class="type">({{error.type}})</span>
118 <md-button class="md-icon-button">
120 md-font-icon="icon-alert-box"
121 aria-label="alert error"
131 layout-align="space-between center"
132 ng-if="!vm.crudPermissions.readOnly"
134 <div layout="row" layout-align="start center">
137 ng-if="vm.crudPermissions.canEdit && !vm.newOpenchannelCannedAnswer"
138 ng-click="vm.saveOpenchannelCannedAnswer()"
139 class="send-button md-accent md-raised"
140 ng-disabled="openchannelCannedAnswerForm.$invalid || openchannelCannedAnswerForm.$pristine"
142 translate="OPENCHANNEL.SAVE"
143 translate-attr-aria-label="OPENCHANNEL.SAVE"
150 ng-if="vm.crudPermissions.canEdit && vm.newOpenchannelCannedAnswer"
151 ng-click="vm.addNewOpenchannelCannedAnswer()"
152 class="send-button md-accent md-raised"
153 ng-disabled="openchannelCannedAnswerForm.$invalid"
155 translate="OPENCHANNEL.ADD_OPENCHANNELCANNEDANSWER"
156 translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELCANNEDANSWER"
158 ADD OPENCHANNELCANNEDANSWER
163 class="md-icon-button"
164 ng-if="vm.crudPermissions.canDelete && !vm.newOpenchannelCannedAnswer"
165 ng-click="vm.deleteOpenchannelCannedAnswer($event)"
168 translate-attr-aria-label="OPENCHANNEL.DELETE"
170 <md-icon md-font-icon="icon-delete"></md-icon>
172 ><span translate="OPENCHANNEL.DELETE">DELETE</span></md-tooltip