fc14cd767c3a2d617cbd4a7f93f8fd07b9b51001
[motion-next.git] /
1 <md-dialog class="queueCampaign-dialog" aria-label="Clone QueueCampaign">
2   <form name="queueCampaignForm" class="md-inline-form" novalidate>
3     <md-toolbar class="md-accent md-hue-2">
4       <div
5         class="md-toolbar-tools"
6         layout="row"
7         layout-align="space-between center"
8       >
9         <span class="title">{{ vm.title | translate }}</span>
10         <md-button class="md-icon-button" ng-click="vm.closeDialog()">
11           <md-icon
12             md-font-icon="icon-close"
13             aria-label="Close dialog"
14           ></md-icon>
15         </md-button>
16       </div>
17     </md-toolbar>
18
19     <md-dialog-content ms-scroll>
20       <div class="error-list">
21         <div
22           ng-repeat="error in vm.errors"
23           class="error"
24           layout="row"
25           layout-align="space-between center"
26         >
27           <div>
28             <span class="message">{{error.message}}</span>
29             <span class="type">({{error.type}})</span>
30           </div>
31           <md-button class="md-icon-button">
32             <md-icon
33               md-font-icon="icon-alert-box"
34               aria-label="alert error"
35               class="s16"
36             ></md-icon>
37           </md-button>
38         </div>
39       </div>
40       <md-input-container class="md-block">
41         <label translate="MOTIONDIALER.NAME">Name</label>
42         <input
43           type="text"
44           name="name"
45           ng-model="vm.queueCampaign.name"
46           ng-pattern="/^[A-Za-z0-9\.\_]+$/i"
47           ng-required="true"
48           autofocus
49           ng-disabled="!vm.newQueueCampaign"
50         />
51
52         <div class="hint"><span translate="MOTIONDIALER.HELP.NAME"></span></div>
53         <div
54           ng-messages="queueCampaignForm['name'].$error"
55           ng-show="queueCampaignForm['name'].$touched"
56           role="alert"
57         >
58           <div ng-message="required">
59             <span translate="MOTIONDIALER.ERRORS.NAME_REQUIRED"
60               >Name field is required</span
61             >
62           </div>
63           <div ng-message="pattern">
64             <span
65               translate="MOTIONDIALER.ERRORS.NAME_MUST_VALID_PATTERN"
66               translate-values="{ regex: '/^[A-Za-z0-9\.\_]+$/i' }"
67               >Name must be valid pattern
68             </span>
69           </div>
70         </div>
71       </md-input-container>
72       <md-input-container class="md-block">
73         <md-switch ng-model="vm.queueCampaign.dialActive" aria-label="Active"
74           ><span translate="MOTIONDIALER.ACTIVE">Active</span></md-switch
75         >
76       </md-input-container>
77
78       <div class="error-list">
79         <div
80           ng-repeat="error in vm.errors"
81           class="error"
82           layout="row"
83           layout-align="space-between center"
84         >
85           <div>
86             <span class="message">{{error.message}}</span>
87             <span class="type">({{error.type}})</span>
88           </div>
89           <md-button class="md-icon-button">
90             <md-icon
91               md-font-icon="icon-alert-box"
92               aria-label="alert error"
93               class="s16"
94             ></md-icon>
95           </md-button>
96         </div>
97       </div>
98     </md-dialog-content>
99
100     <md-dialog-actions layout="row" layout-align="space-between center">
101       <md-button
102         type="submit"
103         ng-click="vm.cloneQueueCampaign()"
104         class="send-button md-accent md-raised"
105         ng-disabled="queueCampaignForm.$invalid"
106         aria-label="CLONE"
107         translate="MOTIONDIALER.CLONE_QUEUECAMPAIGN"
108         translate-attr-aria-label="MOTIONDIALER.CLONE_QUEUECAMPAIGN"
109       >
110         CLONE QUEUECAMPAIGN
111       </md-button>
112     </md-dialog-actions>
113   </form>
114 </md-dialog>