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>
125 <div class="error-list">
127 ng-repeat="error in vm.errors"
130 layout-align="space-between center"
133 <span class="message">{{error.message}}</span>
134 <span class="type">({{error.type}})</span>
136 <md-button class="md-icon-button">
138 md-font-icon="icon-alert-box"
139 aria-label="alert error"
149 layout-align="space-between center"
150 ng-if="!vm.crudPermissions.readOnly"
152 <div layout="row" layout-align="start center">
155 ng-if="vm.crudPermissions.canEdit && !vm.newHopper"
156 ng-click="vm.saveHopper()"
157 class="send-button md-accent md-raised"
158 ng-disabled="hopperForm.$invalid || hopperForm.$pristine"
160 translate="MOTIONDIALER.SAVE"
161 translate-attr-aria-label="MOTIONDIALER.SAVE"
168 ng-if="vm.crudPermissions.canEdit && vm.newHopper"
169 ng-click="vm.addNewHopper()"
170 class="send-button md-accent md-raised"
171 ng-disabled="hopperForm.$invalid"
173 translate="MOTIONDIALER.ADD_HOPPER"
174 translate-attr-aria-label="MOTIONDIALER.ADD_HOPPER"
181 class="md-icon-button"
182 ng-if="vm.crudPermissions.canDelete && !vm.newHopper"
183 ng-click="vm.deleteHopper($event)"
186 translate-attr-aria-label="MOTIONDIALER.DELETE"
188 <md-icon md-font-icon="icon-delete"></md-icon>
190 ><span translate="MOTIONDIALER.DELETE">DELETE</span></md-tooltip