]>
git.proxmox.com Git - pmg-gui.git/blob - js/FetchmailEdit.js
1 /*jslint confusion: true*/
2 /*value is string and number*/
3 Ext
.define('PMG.FetchmailEdit', {
4 extend
: 'Proxmox.window.Edit',
5 xtype
: 'pmgFetchmailEdit',
13 fieldDefaults
: { labelWidth
: 120 },
17 xclass
: 'Ext.app.ViewController',
19 onProtocolChange: function() {
20 var protocol
= this.lookupReference('protocol').getValue();
21 var ssl
= this.lookupReference('ssl').getValue();
23 var port_field
= this.lookupReference('port');
24 if (protocol
=== 'pop3') {
25 port_field
.setValue(ssl
? 995 : 110);
26 } else if (protocol
=== 'imap') {
27 port_field
.setValue(ssl
? 993 : 143);
38 fieldLabel
: gettext('Server'),
42 xtype
: 'proxmoxKVComboBox',
43 fieldLabel
: gettext('Protocol'),
45 reference
: 'protocol',
47 listeners
: { change
: 'onProtocolChange' },
48 comboItems
: [['pop3', 'pop3'], ['imap', 'imap']]
51 xtype
: 'proxmoxintegerfield',
54 fieldLabel
: gettext('Port'),
63 fieldLabel
: gettext('Username'),
69 inputType
: 'password',
70 fieldLabel
: gettext('Password'),
76 fieldLabel
: gettext('Deliver to'),
83 xtype
: 'proxmoxcheckbox',
84 fieldLabel
: gettext('Enabled'),
90 xtype
: 'proxmoxintegerfield',
92 fieldLabel
: gettext('Interval'),
99 xtype
: 'proxmoxcheckbox',
100 fieldLabel
: gettext('Use SSL'),
101 listeners
: { change
: 'onProtocolChange' },
108 xtype
: 'proxmoxcheckbox',
109 fieldLabel
: gettext('Keep old mails'),