1 <md-dialog class="internalroute-dialog" aria-label="New InternalRoute">
2 <form name="internalrouteFormApp" 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.TRUNK">Trunk</label>
44 ng-model="vm.externaldial.trunk"
47 ng-disabled="!vm.crudPermissions.canEdit"
51 ng-repeat="trunk in vm.trunks"
52 ng-disabled="trunk.canSelect === false"
53 >{{ trunk.name }}</md-option
57 ng-messages="internalrouteFormApp['trunk'].$error"
58 ng-show="internalrouteFormApp['trunk'].$touched"
61 <div ng-message="required">
62 <span translate="VOICE.ERRORS.TRUNK_REQUIRED"
63 >Trunk field is required</span
68 <md-input-container class="md-block">
69 <label translate="VOICE.PHONE">Phone</label>
73 ng-model="vm.externaldial.phone"
74 ng-disabled="!vm.crudPermissions.canEdit"
78 ng-messages="internalrouteFormApp['phone'].$error"
79 ng-show="internalrouteFormApp['phone'].$touched"
82 <div ng-message="required">
83 <span translate="VOICE.ERRORS.PHONE_REQUIRED"
84 >Phone field is required</span
89 <md-input-container class="md-block">
90 <label translate="VOICE.TIMEOUT">Timeout</label>
94 ng-model="vm.externaldial.timeout"
96 ng-disabled="!vm.crudPermissions.canEdit"
100 ng-messages="internalrouteFormApp['timeout'].$error"
101 ng-show="internalrouteFormApp['timeout'].$touched"
104 <div ng-message="required">
105 <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED"
106 >Timeout field is required</span
109 <div ng-message="min">
111 translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
112 >Timeout must be a valid greater or equal than</span
117 </md-input-container>
118 <md-input-container class="md-block">
119 <label translate="VOICE.OPTIONS">Options</label>
123 ng-model="vm.externaldial.options"
124 ng-disabled="!vm.crudPermissions.canEdit"
128 ng-messages="internalrouteFormApp['options'].$error"
129 ng-show="internalrouteFormApp['options'].$touched"
132 <div ng-message="required">
133 <span translate="VOICE.ERRORS.OPTIONS_REQUIRED"
134 >Options field is required</span
138 </md-input-container>
139 <md-input-container class="md-block">
140 <label translate="VOICE.URL">Url</label>
144 ng-model="vm.externaldial.url"
145 ng-disabled="!vm.crudPermissions.canEdit"
149 ng-messages="internalrouteFormApp['url'].$error"
150 ng-show="internalrouteFormApp['url'].$touched"
153 <div ng-message="required">
154 <span translate="VOICE.ERRORS.URL_REQUIRED"
155 >Url field is required</span
159 </md-input-container>
161 <div class="error-list">
163 ng-repeat="error in vm.errors"
166 layout-align="space-between center"
169 <span class="message">{{error.message}}</span>
170 <span class="type">({{error.type}})</span>
172 <md-button class="md-icon-button">
174 md-font-icon="icon-alert-box"
175 aria-label="alert error"
183 <md-dialog-actions layout="row" layout-align="space-between center">
186 layout-align="start center"
187 ng-if="vm.crudPermissions.canEdit"
191 ng-click="vm.saveInternalRouteApp()"
192 class="send-button md-accent md-raised"
193 ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine"
195 translate="VOICE.SAVE"
196 translate-attr-aria-label="VOICE.SAVE"