mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-07-25 21:47:35 +00:00
MailProxyRelaying: use add_boolean_row and add_integer_row helpers
This commit is contained in:
parent
4fad6a19f0
commit
dae26b9574
@ -5,74 +5,42 @@ Ext.define('PMG.MailProxyRelaying', {
|
|||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
var rows = {
|
me.rows.relay = {
|
||||||
relay: {
|
required: true,
|
||||||
required: true,
|
defaultValue: Proxmox.Utils.noneText,
|
||||||
defaultValue: Proxmox.Utils.noneText,
|
header: gettext('Default Relay'),
|
||||||
header: gettext('Default Relay'),
|
editor: {
|
||||||
editor: {
|
xtype: 'proxmoxWindowEdit',
|
||||||
xtype: 'proxmoxWindowEdit',
|
subject: gettext('Default Relay'),
|
||||||
subject: gettext('Default Relay'),
|
items: {
|
||||||
items: {
|
xtype: 'proxmoxtextfield',
|
||||||
xtype: 'proxmoxtextfield',
|
name: 'relay',
|
||||||
name: 'relay',
|
deleteEmpty: true,
|
||||||
deleteEmpty: true,
|
fieldLabel: gettext('Default Relay')
|
||||||
fieldLabel: gettext('Default Relay')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
relayport: {
|
};
|
||||||
required: true,
|
|
||||||
defaultValue: 25,
|
|
||||||
header: gettext('SMTP port'),
|
|
||||||
editor: {
|
|
||||||
xtype: 'proxmoxWindowEdit',
|
|
||||||
subject: gettext('SMTP Port'),
|
|
||||||
items: {
|
|
||||||
xtype: 'proxmoxintegerfield',
|
|
||||||
name: 'relayport',
|
|
||||||
minValue: 1,
|
|
||||||
maxValue: 65535,
|
|
||||||
deleteEmpty: true,
|
|
||||||
value: 25,
|
|
||||||
fieldLabel: gettext('SMTP port')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
relaynomx: {
|
|
||||||
required: true,
|
|
||||||
defaultValue: 0,
|
|
||||||
header: gettext('Disable MX lookup'),
|
|
||||||
renderer: Proxmox.Utils.format_boolean,
|
|
||||||
editor: {
|
|
||||||
xtype: 'proxmoxWindowEdit',
|
|
||||||
subject: gettext('Disable MX lookup'),
|
|
||||||
items: {
|
|
||||||
xtype: 'proxmoxcheckbox',
|
|
||||||
name: 'relaynomx',
|
|
||||||
uncheckedValue: 0,
|
|
||||||
defaultValue: 0,
|
|
||||||
deleteDefaultValue: true,
|
|
||||||
fieldLabel: gettext('Disable MX lookup')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
smarthost: {
|
|
||||||
required: true,
|
|
||||||
defaultValue: Proxmox.Utils.noneText,
|
|
||||||
header: gettext('Smarthost'),
|
|
||||||
editor: {
|
|
||||||
xtype: 'proxmoxWindowEdit',
|
|
||||||
subject: gettext('Smarthost'),
|
|
||||||
items: {
|
|
||||||
xtype: 'proxmoxtextfield',
|
|
||||||
name: 'smarthost',
|
|
||||||
deleteEmpty: true,
|
|
||||||
fieldLabel: gettext('Smarthost')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
me.add_integer_row('relayport', gettext('SMTP Port'),
|
||||||
|
{ defaultValue: 25, deleteEmpty: true,
|
||||||
|
minValue: 1, maxValue: 65535 });
|
||||||
|
|
||||||
|
me.add_boolean_row('relaynomx', ettext('Disable MX lookup'));
|
||||||
|
|
||||||
|
me.rows.smarthost = {
|
||||||
|
required: true,
|
||||||
|
defaultValue: Proxmox.Utils.noneText,
|
||||||
|
header: gettext('Smarthost'),
|
||||||
|
editor: {
|
||||||
|
xtype: 'proxmoxWindowEdit',
|
||||||
|
subject: gettext('Smarthost'),
|
||||||
|
items: {
|
||||||
|
xtype: 'proxmoxtextfield',
|
||||||
|
name: 'smarthost',
|
||||||
|
deleteEmpty: true,
|
||||||
|
fieldLabel: gettext('Smarthost')
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var baseurl = '/config/mail';
|
var baseurl = '/config/mail';
|
||||||
@ -84,7 +52,6 @@ Ext.define('PMG.MailProxyRelaying', {
|
|||||||
},
|
},
|
||||||
interval: 5000,
|
interval: 5000,
|
||||||
cwidth1: 200,
|
cwidth1: 200,
|
||||||
rows: rows,
|
|
||||||
listeners: {
|
listeners: {
|
||||||
itemdblclick: me.run_editor
|
itemdblclick: me.run_editor
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user