sendmail: smtp: allow one to override the default mail author
In PBS, we obviously don't have "Proxmox VE" as a default sender, so we need a mechanism to change the default author. Signed-off-by: Lukas Wagner <l.wagner@proxmox.com> Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
3a4432a6e4
commit
f95fcc26b6
@ -52,11 +52,13 @@ Ext.define('Proxmox.Schema', { // a singleton
|
||||
name: 'Sendmail',
|
||||
ipanel: 'pmxSendmailEditPanel',
|
||||
iconCls: 'fa-envelope-o',
|
||||
defaultMailAuthor: 'Proxmox VE',
|
||||
},
|
||||
smtp: {
|
||||
name: 'SMTP',
|
||||
ipanel: 'pmxSmtpEditPanel',
|
||||
iconCls: 'fa-envelope-o',
|
||||
defaultMailAuthor: 'Proxmox VE',
|
||||
},
|
||||
gotify: {
|
||||
name: 'Gotify',
|
||||
@ -65,6 +67,13 @@ Ext.define('Proxmox.Schema', { // a singleton
|
||||
},
|
||||
},
|
||||
|
||||
// to add or change existing for product specific ones
|
||||
overrideEndpointTypes: function(extra) {
|
||||
for (const [key, value] of Object.entries(extra)) {
|
||||
Proxmox.Schema.notificationEndpointTypes[key] = value;
|
||||
}
|
||||
},
|
||||
|
||||
pxarFileTypes: {
|
||||
b: { icon: 'cube', label: gettext('Block Device') },
|
||||
c: { icon: 'tty', label: gettext('Character Device') },
|
||||
|
@ -58,8 +58,8 @@ Ext.define('Proxmox.panel.SendmailEditPanel', {
|
||||
fieldLabel: gettext('Author'),
|
||||
name: 'author',
|
||||
allowBlank: true,
|
||||
emptyText: 'Proxmox VE',
|
||||
cbind: {
|
||||
emptyText: '{defaultMailAuthor}',
|
||||
deleteEmpty: '{!isCreate}',
|
||||
},
|
||||
},
|
||||
|
@ -161,8 +161,8 @@ Ext.define('Proxmox.panel.SmtpEditPanel', {
|
||||
fieldLabel: gettext('Author'),
|
||||
name: 'author',
|
||||
allowBlank: true,
|
||||
emptyText: gettext('Proxmox VE'),
|
||||
cbind: {
|
||||
emptyText: '{defaultMailAuthor}',
|
||||
deleteEmpty: '{!isCreate}',
|
||||
},
|
||||
},
|
||||
|
@ -45,6 +45,7 @@ Ext.define('Proxmox.window.EndpointEditBase', {
|
||||
isCreate: me.isCreate,
|
||||
baseUrl: me.baseUrl,
|
||||
type: me.type,
|
||||
defaultMailAuthor: endpointConfig.defaultMailAuthor,
|
||||
}],
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user