1 <md-dialog class="hopper-dialog" aria-label="New Hopper">
2 <form name="hopperForm" 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 <div class="md-block">
41 <label translate="MOTIONDIALER.SCHEDULEDAT">ScheduledAt</label>
42 <md-content layout="row" class="md-padding">
43 <div flex class="md-block">
46 name="scheduledatDate"
47 mdp-placeholder="Date"
48 mdp-format="YYYY-MM-DD"
49 ng-model="vm.hopper.scheduledat"
50 ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)"
53 ng-messages="hopperForm.dateRangeFrom.$error"
54 ng-show="hopperForm.dateRangeFrom.$touched"
57 <div ng-message="required">
58 <span translate="MOTIONDIALER.ERRORS.DATE_REQUIRED"
59 >Date is required</span
62 <div ng-message="format">
63 <span translate="MOTIONDIALER.ERRORS.DATE_INVALID"
64 >Date is invalid</span
70 <div flex class="md-block">
73 name="scheduledatTime"
74 mdp-placeholder="Time"
76 mdp-auto-switch="true"
77 ng-model="vm.hopper.scheduledat"
78 ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)"
81 ng-messages="hopperForm.timeRangeFrom.$error"
82 ng-show="hopperForm.timeRangeFrom.$touched"
85 <div ng-message="required">
86 <span translate="MOTIONDIALER.ERRORS.TIME_REQUIRED"
87 >Time is required</span
90 <div ng-message="format">
91 <span translate="MOTIONDIALER.ERRORS.TIME_INVALID"
92 >Time is invalid</span
100 <md-input-container class="md-block">
101 <label translate="MOTIONDIALER.PRIORITY">Priority</label>
102 <md-select name="priority" ng-model="vm.hopper.priority">
103 <md-option ng-value="'4'">Highest</md-option>
104 <md-option ng-value="'3'">High</md-option>
105 <md-option ng-value="'2'">Medium</md-option>
106 <md-option ng-value="'1'">Low</md-option>
107 <md-option ng-value="'0'">Lowest</md-option>
110 <span translate="MOTIONDIALER.HELP.PRIORITY"></span>
113 ng-messages="hopperForm['priority'].$error"
114 ng-show="hopperForm['priority'].$touched"
117 <div ng-message="required">
118 <span translate="MOTIONDIALER.ERRORS.PRIORITY_REQUIRED"
119 >Priority field is required</span
123 </md-input-container>
124 <md-input-container class="md-block">
125 <md-switch ng-model="vm.hopper.recallme" aria-label="RecallAgent"
126 ><span translate="MOTIONDIALER.RECALLAGENT"
130 </md-input-container>
131 <md-input-container ng-if="vm.hopper.recallme" class="md-block">
132 <label translate="MOTIONDIALER.AGENT">Agent</label>
133 <md-select name="UserId" ng-model="vm.hopper.UserId" required>
136 ng-repeat="UserId in vm.agents"
137 ng-disabled="UserId.canSelect === false"
138 >{{ UserId.name }}</md-option
142 ng-messages="hopperForm['UserId'].$error"
143 ng-show="hopperForm['UserId'].$touched"
146 <div ng-message="required">
147 <span translate="MOTIONDIALER.ERRORS.AGENT_REQUIRED"
148 >Agent field is required</span
152 </md-input-container>
154 <div class="error-list">
156 ng-repeat="error in vm.errors"
159 layout-align="space-between center"
162 <span class="message">{{error.message}}</span>
163 <span class="type">({{error.type}})</span>
165 <md-button class="md-icon-button">
167 md-font-icon="icon-alert-box"
168 aria-label="alert error"
178 layout-align="space-between center"
179 ng-if="!vm.crudPermissions.readOnly"
181 <div layout="row" layout-align="start center">
184 ng-if="vm.crudPermissions.canEdit && !vm.newHopper"
185 ng-click="vm.saveHopper()"
186 class="send-button md-accent md-raised"
187 ng-disabled="hopperForm.$invalid || hopperForm.$pristine"
189 translate="MOTIONDIALER.SAVE"
190 translate-attr-aria-label="MOTIONDIALER.SAVE"
197 ng-if="vm.crudPermissions.canEdit && vm.newHopper"
198 ng-click="vm.addNewHopper()"
199 class="send-button md-accent md-raised"
200 ng-disabled="hopperForm.$invalid"
202 translate="MOTIONDIALER.ADD_HOPPER"
203 translate-attr-aria-label="MOTIONDIALER.ADD_HOPPER"
210 class="md-icon-button"
211 ng-if="vm.crudPermissions.canDelete && !vm.newHopper"
212 ng-click="vm.deleteHopper($event)"
215 translate-attr-aria-label="MOTIONDIALER.DELETE"
217 <md-icon md-font-icon="icon-delete"></md-icon>
219 ><span translate="MOTIONDIALER.DELETE">DELETE</span></md-tooltip