1 <md-dialog class="voiceRecording-dialog" aria-label="New VoiceRecording">
2 <form name="voiceRecordingForm" 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="VOICE.RATING">Rating</label>
44 ng-model="vm.voiceRecording.rating"
46 ng-disabled="!vm.newVoiceRecording && !vm.crudPermissions.canEdit"
48 <md-option ng-value="null"
49 >{{'VOICE.NO_RATING' | translate}}</md-option
53 md-font-icon="icon-star"
55 ng-repeat="icon in [1]"
60 md-font-icon="icon-star"
62 ng-repeat="icon in [1,2]"
67 md-font-icon="icon-star"
69 ng-repeat="icon in [1,2,3]"
74 md-font-icon="icon-star"
76 ng-repeat="icon in [1,2,3,4]"
81 md-font-icon="icon-star"
83 ng-repeat="icon in [1,2,3,4,5]"
88 ng-messages="voiceRecordingForm['rating'].$error"
89 ng-show="voiceRecordingForm[rating].$touched"
92 <div ng-message="required">
93 <span translate="VOICE.ERRORS.RATING_REQUIRED"
94 >Rating field is required</span
100 <div class="error-list">
102 ng-repeat="error in vm.errors"
105 layout-align="space-between center"
108 <span class="message">{{error.message}}</span>
109 <span class="type">({{error.type}})</span>
111 <md-button class="md-icon-button">
113 md-font-icon="icon-alert-box"
114 aria-label="alert error"
124 layout-align="space-between center"
125 ng-if="!vm.crudPermissions.readOnly"
127 <div layout="row" layout-align="start center">
130 ng-if="vm.crudPermissions.canEdit && !vm.newVoiceRecording"
131 ng-click="vm.saveVoiceRecording()"
132 class="send-button md-accent md-raised"
133 ng-disabled="voiceRecordingForm.$invalid || voiceRecordingForm.$pristine"
135 translate="VOICE.SAVE"
136 translate-attr-aria-label="VOICE.SAVE"
143 ng-if="vm.crudPermissions.canEdit && vm.newVoiceRecording"
144 ng-click="vm.addNewVoiceRecording()"
145 class="send-button md-accent md-raised"
146 ng-disabled="voiceRecordingForm.$invalid"
148 translate="VOICE.ADD_VOICERECORDING"
149 translate-attr-aria-label="VOICE.ADD_VOICERECORDING"
156 class="md-icon-button"
157 ng-if="vm.crudPermissions.canDelete && !vm.newVoiceRecording"
158 ng-click="vm.deleteVoiceRecording($event)"
161 translate-attr-aria-label="VOICE.DELETE"
163 <md-icon md-font-icon="icon-delete"></md-icon>
164 <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>