1 <md-dialog class="internalroute-dialog" aria-label="New InternalRoute">
2 <form name="internalrouteForm" 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.PHONENUMBER">PhoneNumber</label>
45 ng-model="vm.internalroute.exten"
51 ng-messages="internalrouteForm['exten'].$error"
52 ng-show="internalrouteForm['exten'].$touched"
55 <div ng-message="required">
56 <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED"
57 >PhoneNumber field is required</span
62 <md-input-container class="md-block">
63 <label translate="VOICE.CONTEXT">Context</label>
64 <md-select name="context" ng-model="vm.internalroute.context" required>
66 ng-value="context.name"
67 ng-repeat="context in vm.contexts"
68 ng-disabled="context.canSelect === false"
69 >{{ context.name }}</md-option
73 ng-messages="internalrouteForm['context'].$error"
74 ng-show="internalrouteForm['context'].$touched"
77 <div ng-message="required">
78 <span translate="VOICE.ERRORS.CONTEXT_REQUIRED"
79 >Context field is required</span
84 <md-input-container class="md-block">
85 <label translate="VOICE.DESCRIPTION">Description</label>
89 ng-model="vm.internalroute.description"
93 ng-messages="internalrouteForm['description'].$error"
94 ng-show="internalrouteForm['description'].$touched"
97 <div ng-message="required">
98 <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED"
99 >Description field is required</span
103 </md-input-container>
105 <div class="error-list">
107 ng-repeat="error in vm.errors"
110 layout-align="space-between center"
113 <span class="message">{{error.message}}</span>
114 <span class="type">({{error.type}})</span>
116 <md-button class="md-icon-button">
118 md-font-icon="icon-alert-box"
119 aria-label="alert error"
129 layout-align="space-between center"
130 ng-if="!vm.crudPermissions.readOnly"
132 <div layout="row" layout-align="start center">
135 ng-if="vm.crudPermissions.canEdit && !vm.newInternalRoute"
136 ng-click="vm.saveInternalRoute()"
137 class="send-button md-accent md-raised"
138 ng-disabled="internalrouteForm.$invalid || internalrouteForm.$pristine"
140 translate="VOICE.SAVE"
141 translate-attr-aria-label="VOICE.SAVE"
148 ng-if="vm.crudPermissions.canEdit && vm.newInternalRoute"
149 ng-click="vm.addNewInternalRoute()"
150 class="send-button md-accent md-raised"
151 ng-disabled="internalrouteForm.$invalid"
153 translate="VOICE.ADD_INTERNALROUTE"
154 translate-attr-aria-label="VOICE.ADD_INTERNALROUTE"
161 class="md-icon-button"
162 ng-if="vm.crudPermissions.canDelete && !vm.newInternalRoute"
163 ng-click="vm.deleteInternalRoute($event)"
166 translate-attr-aria-label="VOICE.DELETE"
168 <md-icon md-font-icon="icon-delete"></md-icon>
169 <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>