/
UIxAccountEditor.wox
137 lines (120 loc) · 7.1 KB
/
UIxAccountEditor.wox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE var:component>
<var:component
xmlns="http://www.w3.org/1999/xhtml"
xmlns:var="http://www.skyrix.com/od/binding"
xmlns:const="http://www.skyrix.com/od/constant"
xmlns:uix="OGo:uix"
xmlns:rsrc="OGo:url"
xmlns:label="OGo:label"
className="UIxPageFrame"
>
<md-dialog>
<md-dialog-content>
<form id="mainForm" name="accountForm" var:href="ownPath">
<md-input-container>
<label><var:string label:value="Account Name"/></label>
<input type="text" required="required"
ng-readonly="$AccountDialogController.accountId == 0"
ng-model="$AccountDialogController.account.name"/>
</md-input-container>
<md-input-container>
<label><var:string label:value="Server Name"/></label>
<input type="text" required="required"
ng-readonly="$AccountDialogController.accountId == 0"
ng-model="$AccountDialogController.account.serverName"/>
</md-input-container>
<md-input-container>
<label><var:string label:value="Port"/></label>
<input type="number" required="required" min="1" max="65535"
ng-readonly="$AccountDialogController.accountId == 0"
ng-model="$AccountDialogController.account.port"/>
</md-input-container>
<label><var:string label:value="Encryption"/></label>
<md-radio-group ng-model="$AccountDialogController.account.encryption">
<md-radio-button ng-disabled="$AccountDialogController.accountId == 0" value="none" class="md-primary"><var:string label:value="None"/></md-radio-button>
<md-radio-button ng-disabled="$AccountDialogController.accountId == 0" value="ssl"><var:string label:value="SSL"/></md-radio-button>
<md-radio-button ng-disabled="$AccountDialogController.accountId == 0" value="tls"><var:string label:value="TLS"/></md-radio-button>
</md-radio-group>
<md-input-container>
<label><var:string label:value="User Name"/></label>
<input type="text" required="required"
ng-readonly="$AccountDialogController.accountId == 0"
ng-model="$AccountDialogController.account.userName"/>
</md-input-container>
<md-input-container>
<label><var:string label:value="Password"/></label>
<input type="password"
ng-readonly="$AccountDialogController.accountId == 0"
ng-model="$AccountDialogController.account.password"/>
</md-input-container>
<md-input-container>
<label><var:string label:value="Full Name"/></label>
<input type="text" required="required"
ng-readonly="$AccountDialogController.customFromIsReadonly()"
ng-model="$AccountDialogController.account.identities[0].fullName"/>
</md-input-container>
<md-input-container>
<label><var:string label:value="Email"/></label>
<input type="email" required="required"
ng-readonly="$AccountDialogController.customFromIsReadonly()"
ng-model="$AccountDialogController.account.identities[0].email"/>
</md-input-container>
<md-input-container>
<label><var:string label:value="Reply To Email"/></label>
<input type="email" ng-model="$AccountDialogController.account.identities[0].replyTo"/>
</md-input-container>
<!-- To switch between a simple text editor and the CK/HTML editor, we use a ng-if and not
a ng-class as it doesn't get initialized by the ckEditor class directive -->
<md-input-container ng-if="$AccountDialogController.defaults.SOGoMailComposeMessageType == 'text'">
<label><var:string label:value="Signature"/> {{$AccountDialogController.defaults.SOGoMailComposeMessageType}}</label>
<textarea ng-model="$AccountDialogController.account.identities[0].signature"><!-- signature --></textarea>
</md-input-container>
<div class="pseudo-input-container"
ng-if="$AccountDialogController.defaults.SOGoMailComposeMessageType == 'html'">
<label class="pseudo-input-label"><var:string label:value="Signature"/> {{$AccountDialogController.defaults.LocaleCode}}</label>
<textarea class="ck-editor"
ck-locale="$AccountDialogController.defaults.LocaleCode"
ck-options="{ 'height': '70px',
'toolbar': [['Bold', 'Italic', '-', 'Link',
'Font','FontSize','-','TextColor',
'BGColor']] }"
ng-model="$AccountDialogController.account.identities[0].signature"><!-- signature --></textarea>
</div>
<md-radio-group ng-model="$AccountDialogController.account.receipts.receiptAction">
<label><var:string label:value="When I receive a request for a return receipt"/></label>
<md-radio-button value="ignore"><var:string label:value="Never send a return receipt"/></md-radio-button>
<md-radio-button value="allow"><var:string label:value="Allow return receipts for some messages"/></md-radio-button>
</md-radio-group>
<label>
<var:string label:value="If I'm not in the To or Cc of the message"/>
<md-select ng-model="$AccountDialogController.account.receipts.receiptNonRecipientAction">
<md-option const:value="ignore"><var:string label:value="Never send"/></md-option>
<md-option const:value="send"><var:string label:value="Always send"/></md-option>
<md-option const:value="ask"><var:string label:value="Ask me"/></md-option>
</md-select>
</label>
<label>
<var:string label:value="If the sender is outside my domain"/>
<md-select ng-model="$AccountDialogController.account.receipts.receiptOutsideDomainAction">
<md-option const:value="ignore"><var:string label:value="Never send"/></md-option>
<md-option const:value="send"><var:string label:value="Always send"/></md-option>
<md-option const:value="ask"><var:string label:value="Ask me"/></md-option>
</md-select>
</label>
<label>
<var:string label:value="In all other cases"/>
<md-select ng-model="$AccountDialogController.account.receipts.receiptAnyAction">
<md-option const:value="ignore"><var:string label:value="Never send"/></md-option>
<md-option const:value="send"><var:string label:value="Always send"/></md-option>
<md-option const:value="ask"><var:string label:value="Ask me"/></md-option>
</md-select>
</label>
</form>
</md-dialog-content>
<div class="md-actions">
<md-button type="button" ng-click="$AccountDialogController.cancel()"><var:string label:value="Cancel"/></md-button>
<md-button ng-disabled="$AccountDialogController.accountForm.$invalid" ng-click="$AccountDialogController.save()"><var:string label:value="Save"/></md-button>
</div>
</md-dialog>
</var:component>