2 class="chatProactiveAction-dialog"
3 aria-label="New ChatProactiveAction"
5 <form name="chatProactiveActionForm" 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="CHAT.NAME">Name</label>
48 ng-model="vm.chatProactiveAction.name"
54 ng-messages="chatProactiveActionForm['name'].$error"
55 ng-show="chatProactiveActionForm['name'].$touched"
58 <div ng-message="required">
59 <span translate="CHAT.ERRORS.NAME_REQUIRED"
60 >Name field is required</span
65 <md-input-container class="md-block">
66 <label translate="CHAT.TYPE">Type</label>
67 <md-select name="type" ng-model="vm.chatProactiveAction.type">
68 <md-option ng-value="'mouseOver'">
69 {{ 'CHAT.MOUSEOVER' | translate }}
72 <md-option ng-value="'timeout'">
73 {{ 'CHAT.TIMEOUT' | translate }}
77 ng-messages="chatProactiveActionForm['type'].$error"
78 ng-show="chatProactiveActionForm['type'].$touched"
81 <div ng-message="required">
82 <span translate="CHAT.ERRORS.TYPE_REQUIRED"
83 >Type field is required</span
89 ng-if="vm.chatProactiveAction.type === 'mouseOver'"
92 <label translate="CHAT.SELECTOR">Selector</label>
96 ng-model="vm.chatProactiveAction.selector"
101 ng-messages="chatProactiveActionForm['selector'].$error"
102 ng-show="chatProactiveActionForm['selector'].$touched"
105 <div ng-message="required">
106 <span translate="CHAT.ERRORS.SELECTOR_REQUIRED"
107 >Selector field is required</span
111 </md-input-container>
113 ng-if="vm.chatProactiveAction.type === 'timeout'"
116 <label translate="CHAT.TIMEOUT">Timeout</label>
120 ng-model="vm.chatProactiveAction.timeout"
126 ng-messages="chatProactiveActionForm['timeout'].$error"
127 ng-show="chatProactiveActionForm['timeout'].$touched"
130 <div ng-message="required">
131 <span translate="CHAT.ERRORS.TIMEOUT_REQUIRED"
132 >Timeout field is required</span
135 <div ng-message="min">
137 translate="CHAT.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
138 >Timeout must be a valid greater or equal than</span
143 </md-input-container>
145 <div class="error-list">
147 ng-repeat="error in vm.errors"
150 layout-align="space-between center"
153 <span class="message">{{error.message}}</span>
154 <span class="type">({{error.type}})</span>
156 <md-button class="md-icon-button">
158 md-font-icon="icon-alert-box"
159 aria-label="alert error"
169 layout-align="space-between center"
170 ng-if="!vm.crudPermissions.readOnly"
172 <div layout="row" layout-align="start center">
175 ng-if="vm.crudPermissions.canEdit && !vm.newChatProactiveAction"
176 ng-click="vm.saveChatProactiveAction()"
177 class="send-button md-accent md-raised"
178 ng-disabled="chatProactiveActionForm.$invalid || chatProactiveActionForm.$pristine"
180 translate="CHAT.SAVE"
181 translate-attr-aria-label="CHAT.SAVE"
188 ng-if="vm.crudPermissions.canEdit && vm.newChatProactiveAction"
189 ng-click="vm.addNewChatProactiveAction()"
190 class="send-button md-accent md-raised"
191 ng-disabled="chatProactiveActionForm.$invalid"
193 translate="CHAT.ADD_CHATPROACTIVEACTION"
194 translate-attr-aria-label="CHAT.ADD_CHATPROACTIVEACTION"
196 ADD CHATPROACTIVEACTION
201 class="md-icon-button"
202 ng-if="vm.crudPermissions.canDelete && !vm.newChatProactiveAction"
203 ng-click="vm.deleteChatProactiveAction($event)"
206 translate-attr-aria-label="CHAT.DELETE"
208 <md-icon md-font-icon="icon-delete"></md-icon>
209 <md-tooltip><span translate="CHAT.DELETE">DELETE</span></md-tooltip>