]>
git.proxmox.com Git - pmg-gui.git/blob - js/FetchmailEdit.js
1 Ext
.define('PMG.FetchmailEdit', {
2 extend
: 'Proxmox.window.Edit',
3 xtype
: 'pmgFetchmailEdit',
11 fieldDefaults
: { labelWidth
: 120 },
15 xclass
: 'Ext.app.ViewController',
17 onProtocolChange: function() {
18 var protocol
= this.lookupReference('protocol').getValue();
19 var ssl
= this.lookupReference('ssl').getValue();
21 var port_field
= this.lookupReference('port');
22 if (protocol
=== 'pop3') {
23 port_field
.setValue(ssl
? 995 : 110);
24 } else if (protocol
=== 'imap') {
25 port_field
.setValue(ssl
? 993 : 143);
36 fieldLabel
: gettext('Server'),
40 xtype
: 'proxmoxKVComboBox',
41 fieldLabel
: gettext('Protocol'),
43 reference
: 'protocol',
45 listeners
: { change
: 'onProtocolChange' },
46 comboItems
: [['pop3', 'pop3'], ['imap', 'imap']]
49 xtype
: 'proxmoxintegerfield',
52 fieldLabel
: gettext('Port'),
61 fieldLabel
: gettext('Username'),
67 inputType
: 'password',
68 fieldLabel
: gettext('Passsword'),
74 fieldLabel
: gettext('Deliver to'),
81 xtype
: 'proxmoxcheckbox',
82 fieldLabel
: gettext('Enabled'),
88 xtype
: 'proxmoxintegerfield',
90 fieldLabel
: gettext('Interval'),
97 xtype
: 'proxmoxcheckbox',
98 fieldLabel
: gettext('Use SSL'),
99 listeners
: { change
: 'onProtocolChange' },
106 xtype
: 'proxmoxcheckbox',
107 fieldLabel
: gettext('Keep old mails'),