1 <md-dialog class="deskConfiguration-dialog" aria-label="New DeskConfiguration">
2 <form name="deskConfigurationForm" 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="INTEGRATIONS.NAME">Name</label>
45 ng-model="vm.deskConfiguration.name"
51 ng-messages="deskConfigurationForm['name'].$error"
52 ng-show="deskConfigurationForm['name'].$touched"
55 <div ng-message="required">
56 <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED"
57 >Name field is required</span
62 <md-input-container class="md-block">
63 <label translate="INTEGRATIONS.CHANNEL">Channel</label>
66 ng-model="vm.deskConfiguration.channel"
69 <md-option ng-value="'voice'">
70 {{ 'INTEGRATIONS.VOICE' | translate }}
74 ng-messages="deskConfigurationForm['channel'].$error"
75 ng-show="deskConfigurationForm['channel'].$touched"
78 <div ng-message="required">
79 <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED"
80 >Channel field is required</span
85 <md-input-container class="md-block">
86 <label translate="INTEGRATIONS.TYPE">Type</label>
87 <md-select name="type" ng-model="vm.deskConfiguration.type" required>
88 <md-option ng-value="'inbound'">
89 {{ 'INTEGRATIONS.INBOUND_IN_QUEUE' | translate }}
92 <md-option ng-value="'outbound'">
93 {{ 'INTEGRATIONS.OUTBOUND_CALL' | translate }}
97 ng-messages="deskConfigurationForm['type'].$error"
98 ng-show="deskConfigurationForm['type'].$touched"
101 <div ng-message="required">
102 <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED"
103 >Type field is required</span
107 </md-input-container>
109 <div class="error-list">
111 ng-repeat="error in vm.errors"
114 layout-align="space-between center"
117 <span class="message">{{error.message}}</span>
118 <span class="type">({{error.type}})</span>
120 <md-button class="md-icon-button">
122 md-font-icon="icon-alert-box"
123 aria-label="alert error"
133 layout-align="space-between center"
134 ng-if="!vm.crudPermissions.readOnly"
136 <div layout="row" layout-align="start center">
139 ng-if="vm.crudPermissions.canEdit && !vm.newDeskConfiguration"
140 ng-click="vm.saveDeskConfiguration()"
141 class="send-button md-accent md-raised"
142 ng-disabled="deskConfigurationForm.$invalid || deskConfigurationForm.$pristine"
144 translate="INTEGRATIONS.SAVE"
145 translate-attr-aria-label="INTEGRATIONS.SAVE"
152 ng-if="vm.crudPermissions.canEdit && vm.newDeskConfiguration"
153 ng-click="vm.addNewDeskConfiguration()"
154 class="send-button md-accent md-raised"
155 ng-disabled="deskConfigurationForm.$invalid"
157 translate="INTEGRATIONS.ADD_DESKCONFIGURATION"
158 translate-attr-aria-label="INTEGRATIONS.ADD_DESKCONFIGURATION"
160 ADD DESKCONFIGURATION
165 class="md-icon-button"
166 ng-if="vm.crudPermissions.canDelete && !vm.newDeskConfiguration"
167 ng-click="vm.deleteDeskConfiguration($event)"
170 translate-attr-aria-label="INTEGRATIONS.DELETE"
172 <md-icon md-font-icon="icon-delete"></md-icon>
174 ><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip