]>
git.proxmox.com Git - pmg-gui.git/blob - js/FetchmailEdit.js
1 Ext
.define('PMG.FetchmailEdit', {
2 extend
: 'Proxmox.window.Edit',
3 xtype
: 'pmgFetchmailEdit',
4 onlineHelp
: 'pmgconfig_fetchmail',
12 fieldDefaults
: { labelWidth
: 120 },
16 xclass
: 'Ext.app.ViewController',
18 onProtocolChange: function() {
19 var protocol
= this.lookupReference('protocol').getValue();
20 var ssl
= this.lookupReference('ssl').getValue();
22 var port_field
= this.lookupReference('port');
23 if (protocol
=== 'pop3') {
24 port_field
.setValue(ssl
? 995 : 110);
25 } else if (protocol
=== 'imap') {
26 port_field
.setValue(ssl
? 993 : 143);
37 fieldLabel
: gettext('Server'),
41 xtype
: 'proxmoxKVComboBox',
42 fieldLabel
: gettext('Protocol'),
44 reference
: 'protocol',
46 listeners
: { change
: 'onProtocolChange' },
47 comboItems
: [['pop3', 'pop3'], ['imap', 'imap']],
50 xtype
: 'proxmoxintegerfield',
53 fieldLabel
: gettext('Port'),
62 fieldLabel
: gettext('Username'),
68 inputType
: 'password',
69 fieldLabel
: gettext('Password'),
75 fieldLabel
: gettext('Deliver to'),
82 xtype
: 'proxmoxcheckbox',
83 fieldLabel
: gettext('Enabled'),
89 xtype
: 'proxmoxintegerfield',
91 fieldLabel
: gettext('Interval'),
98 xtype
: 'proxmoxcheckbox',
99 fieldLabel
: gettext('Use SSL'),
100 listeners
: { change
: 'onProtocolChange' },
107 xtype
: 'proxmoxcheckbox',
108 fieldLabel
: gettext('Keep old mails'),