]>
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',
6 onlineHelp
: 'pmgconfig_fetchmail',
14 fieldDefaults
: { labelWidth
: 120 },
18 xclass
: 'Ext.app.ViewController',
20 onProtocolChange: function() {
21 var protocol
= this.lookupReference('protocol').getValue();
22 var ssl
= this.lookupReference('ssl').getValue();
24 var port_field
= this.lookupReference('port');
25 if (protocol
=== 'pop3') {
26 port_field
.setValue(ssl
? 995 : 110);
27 } else if (protocol
=== 'imap') {
28 port_field
.setValue(ssl
? 993 : 143);
39 fieldLabel
: gettext('Server'),
43 xtype
: 'proxmoxKVComboBox',
44 fieldLabel
: gettext('Protocol'),
46 reference
: 'protocol',
48 listeners
: { change
: 'onProtocolChange' },
49 comboItems
: [['pop3', 'pop3'], ['imap', 'imap']]
52 xtype
: 'proxmoxintegerfield',
55 fieldLabel
: gettext('Port'),
64 fieldLabel
: gettext('Username'),
70 inputType
: 'password',
71 fieldLabel
: gettext('Password'),
77 fieldLabel
: gettext('Deliver to'),
84 xtype
: 'proxmoxcheckbox',
85 fieldLabel
: gettext('Enabled'),
91 xtype
: 'proxmoxintegerfield',
93 fieldLabel
: gettext('Interval'),
100 xtype
: 'proxmoxcheckbox',
101 fieldLabel
: gettext('Use SSL'),
102 listeners
: { change
: 'onProtocolChange' },
109 xtype
: 'proxmoxcheckbox',
110 fieldLabel
: gettext('Keep old mails'),