97083afdb567a14ee4fc2fd5e4bbd51c1e03f974
[motion-next.git] /
1 <md-dialog class="compose-dialog-fax" aria-label="New Message">
2   <form class="md-inline-form" name="composeForm" novalidate>
3     <md-toolbar class="md-background-bg">
4       <div
5         class="md-toolbar-tools"
6         layout="row"
7         layout-align="space-between center"
8       >
9         <div layout="row">
10           <md-button
11             ng-click="vm.send()"
12             class="md-raised md-blue-bg white-fg"
13             aria-label="Send message"
14           >
15             <span translate="FAX.SEND">SEND</span>
16           </md-button>
17           <md-button
18             ng-disabled="vm.message.attachments.length === 1"
19             class="md-fab md-mini md-white-bg"
20             aria-label="attachment"
21             translate-attr-aria-label="DASHBOARDS.ATTACHMENT"
22             flow-btn
23             flow-name="vm.ngFlow.flow"
24             flow-files-submitted="vm.upload()"
25             flow-init="vm.ngFlowOptions"
26             flow-file-added="vm.fileAdded($file)"
27             flow-file-success="vm.fileSuccess($file, $message)"
28           >
29             <md-icon md-font-icon="icon-paperclip" class="red-fg"></md-icon>
30           </md-button>
31         </div>
32         <span class="title">{{vm.message.from}}</span>
33         <md-button
34           class="md-icon-button"
35           ng-click="vm.closeDialog()"
36           aria-label="Close dialog"
37           tranlate
38           translate-aria-label="FAX.CLOSE_DIALOG"
39         >
40           <md-icon md-font-icon="icon-close"></md-icon>
41         </md-button>
42       </div>
43     </md-toolbar>
44
45     <md-dialog-content ms-scroll>
46       <md-input-container class="md-block to">
47         <label translate="FAX.TO">To</label>
48         <md-chips
49           name="to"
50           ng-model="vm.message.to"
51           md-transform-chip="vm.transformContact($chip)"
52           md-separator-keys="vm.separatorKeys"
53           md-require-match="false"
54           md-max-chips="1"
55           required
56         >
57           <!-- <input ng-model="vm.message.subject" type="text"> -->
58           <md-autocomplete
59             ng-hide="vm.message.to.length === 1"
60             md-search-text="vm.searchTo"
61             md-items="contact in vm.contactSearch(vm.searchTo)"
62             md-item-text="contact.fax"
63             md-min-length="3"
64           >
65             <md-item-template>
66               <span>{{ vm.getContact(contact) }}</span>
67             </md-item-template>
68           </md-autocomplete>
69         </md-chips>
70         <div ng-messages="composeForm.to.$error" ng-if="composeForm.$dirty">
71           <div ng-message="required">
72             <span translate="FAX.ERRORS.TO_REQUIRED">To field is required</span>
73           </div>
74           <div ng-message="md-max-chips">
75             You reached the maximum amount of chips
76           </div>
77         </div>
78       </md-input-container>
79
80       <div
81         class="attachment-list"
82         ng-if="vm.message.attachments.length"
83         layout="row"
84         layout-wrap
85       >
86         <div
87           class="attachment"
88           layout="row"
89           layout-align="space-between center"
90           ng-repeat="attachment in vm.message.attachments"
91         >
92           <div>
93             <md-icon md-font-icon="icon-paperclip" class="s16"></md-icon>
94             <span class="filename">{{attachment.name}}</span>
95             <span class="size">({{attachment.size | byteFmt: 0}})</span>
96           </div>
97
98           <md-button
99             class="md-icon-button"
100             aria-label="Delete attachment"
101             translate
102             translate-attr-aria-label="FAX.DELETE_ATTACHMENT"
103           >
104             <!-- <md-icon md-font-icon="icon-close" class="s16"></md-icon> -->
105           </md-button>
106         </div>
107       </div>
108     </md-dialog-content>
109   </form>
110 </md-dialog>