f1d6981200f2a4bfe469522c3e5d6fb940d8eff9
[motion-next.git] /
1 <md-dialog
2   class="cm-contact-dialog"
3   aria-label="{{ 'CONTACTMANAGER.DUPLICATE_CONTACT' | translate }}"
4 >
5   <form name="contactForm" class="md-inline-form" novalidate>
6     <md-toolbar class="md-accent md-hue-2">
7       <div
8         class="md-toolbar-tools"
9         layout="row"
10         layout-align="space-between center"
11       >
12         <span class="title">{{ vm.title | translate }}</span>
13         <md-button class="md-icon-button" ng-click="vm.closeDialog()">
14           <md-icon
15             md-font-icon="icon-close"
16             aria-label="Close dialog"
17           ></md-icon>
18         </md-button>
19       </div>
20     </md-toolbar>
21
22     <md-dialog-content ms-scroll>
23       <div class="error-list">
24         <div
25           ng-repeat="error in vm.errors"
26           class="error"
27           layout="row"
28           layout-align="space-between center"
29         >
30           <div>
31             <span class="message">{{error.message}}</span>
32             <span class="type">({{error.type}})</span>
33           </div>
34           <md-button class="md-icon-button">
35             <md-icon
36               md-font-icon="icon-alert-box"
37               aria-label="alert error"
38               class="s16"
39             ></md-icon>
40           </md-button>
41         </div>
42       </div>
43
44       <md-input-container class="md-block">
45         <label translate="CONTACTMANAGER.LIST">List</label>
46         <md-select name="list" ng-model="vm.contact.ListId">
47           <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows"
48             >{{list.name}}</md-option
49           >
50         </md-select>
51
52         <div
53           ng-messages="contactForm.list.$error"
54           ng-show="contactForm.list.$touched"
55           role="alert"
56         >
57           <div ng-message="required">
58             <span translate="CONTACTMANAGER.ERRORS.LIST_REQUIRED"
59               >List field is required</span
60             >
61           </div>
62         </div>
63       </md-input-container>
64
65       <div class="error-list">
66         <div
67           ng-repeat="error in vm.errors"
68           class="error"
69           layout="row"
70           layout-align="space-between center"
71         >
72           <div>
73             <span class="message">{{error.message}}</span>
74             <span class="type">({{error.type}})</span>
75           </div>
76           <md-button class="md-icon-button">
77             <md-icon
78               md-font-icon="icon-alert-box"
79               aria-label="alert error"
80               class="s16"
81             ></md-icon>
82           </md-button>
83         </div>
84       </div>
85     </md-dialog-content>
86
87     <md-dialog-actions layout="row" layout-align="space-between center">
88       <div layout="row" layout-align="start center">
89         <md-button
90           type="submit"
91           ng-click="vm.addNewContact()"
92           class="send-button md-accent md-raised"
93           ng-disabled="contactForm.$invalid"
94           aria-label="ADD"
95           translate="CONTACTMANAGER.ADD_CONTACT"
96           translate-attr-aria-label="CONTACTMANAGER.ADD_CONTACT"
97         >
98           ADD CONTACT
99         </md-button>
100       </div>
101     </md-dialog-actions>
102   </form>
103 </md-dialog>