1 <md-dialog class="smsCannedAnswer-dialog" aria-label="New SmsCannedAnswer">
2 <form name="smsCannedAnswerForm" 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="SMS.KEY">Key</label>
45 ng-model="vm.smsCannedAnswer.key"
52 ng-messages="smsCannedAnswerForm['key'].$error"
53 ng-show="smsCannedAnswerForm['key'].$touched"
56 <div ng-message="required">
57 <span translate="SMS.ERRORS.KEY_REQUIRED"
58 >Key field is required</span
63 <md-input-container class="md-block">
64 <label translate="SMS.VALUE">Value</label>
67 ng-model="vm.smsCannedAnswer.value"
72 ng-messages="smsCannedAnswerForm['value'].$error"
73 ng-show="smsCannedAnswerForm['value'].$touched"
76 <div ng-message="required">
77 <span translate="SMS.ERRORS.VALUE_REQUIRED"
78 >Value field is required</span
83 <md-input-container class="md-block">
84 <label translate="SMS.DESCRIPTION">Description</label>
88 ng-model="vm.smsCannedAnswer.description"
92 ng-messages="smsCannedAnswerForm['description'].$error"
93 ng-show="smsCannedAnswerForm['description'].$touched"
96 <div ng-message="required">
97 <span translate="SMS.ERRORS.DESCRIPTION_REQUIRED"
98 >Description field is required</span
102 </md-input-container>
104 <div class="error-list">
106 ng-repeat="error in vm.errors"
109 layout-align="space-between center"
112 <span class="message">{{error.message}}</span>
113 <span class="type">({{error.type}})</span>
115 <md-button class="md-icon-button">
117 md-font-icon="icon-alert-box"
118 aria-label="alert error"
128 layout-align="space-between center"
129 ng-if="!vm.crudPermissions.readOnly"
131 <div layout="row" layout-align="start center">
134 ng-if="vm.crudPermissions.canEdit && !vm.newSmsCannedAnswer"
135 ng-click="vm.saveSmsCannedAnswer()"
136 class="send-button md-accent md-raised"
137 ng-disabled="smsCannedAnswerForm.$invalid || smsCannedAnswerForm.$pristine"
140 translate-attr-aria-label="SMS.SAVE"
147 ng-if="vm.crudPermissions.canEdit && vm.newSmsCannedAnswer"
148 ng-click="vm.addNewSmsCannedAnswer()"
149 class="send-button md-accent md-raised"
150 ng-disabled="smsCannedAnswerForm.$invalid"
152 translate="SMS.ADD_SMSCANNEDANSWER"
153 translate-attr-aria-label="SMS.ADD_SMSCANNEDANSWER"
160 class="md-icon-button"
161 ng-if="vm.crudPermissions.canDelete && !vm.newSmsCannedAnswer"
162 ng-click="vm.deleteSmsCannedAnswer($event)"
165 translate-attr-aria-label="SMS.DELETE"
167 <md-icon md-font-icon="icon-delete"></md-icon>
168 <md-tooltip><span translate="SMS.DELETE">DELETE</span></md-tooltip>