mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-06-26 06:29:51 +00:00
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',
|
name: 'Sendmail',
|
||||||
ipanel: 'pmxSendmailEditPanel',
|
ipanel: 'pmxSendmailEditPanel',
|
||||||
iconCls: 'fa-envelope-o',
|
iconCls: 'fa-envelope-o',
|
||||||
|
defaultMailAuthor: 'Proxmox VE',
|
||||||
},
|
},
|
||||||
smtp: {
|
smtp: {
|
||||||
name: 'SMTP',
|
name: 'SMTP',
|
||||||
ipanel: 'pmxSmtpEditPanel',
|
ipanel: 'pmxSmtpEditPanel',
|
||||||
iconCls: 'fa-envelope-o',
|
iconCls: 'fa-envelope-o',
|
||||||
|
defaultMailAuthor: 'Proxmox VE',
|
||||||
},
|
},
|
||||||
gotify: {
|
gotify: {
|
||||||
name: '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: {
|
pxarFileTypes: {
|
||||||
b: { icon: 'cube', label: gettext('Block Device') },
|
b: { icon: 'cube', label: gettext('Block Device') },
|
||||||
c: { icon: 'tty', label: gettext('Character Device') },
|
c: { icon: 'tty', label: gettext('Character Device') },
|
||||||
|
@ -58,8 +58,8 @@ Ext.define('Proxmox.panel.SendmailEditPanel', {
|
|||||||
fieldLabel: gettext('Author'),
|
fieldLabel: gettext('Author'),
|
||||||
name: 'author',
|
name: 'author',
|
||||||
allowBlank: true,
|
allowBlank: true,
|
||||||
emptyText: 'Proxmox VE',
|
|
||||||
cbind: {
|
cbind: {
|
||||||
|
emptyText: '{defaultMailAuthor}',
|
||||||
deleteEmpty: '{!isCreate}',
|
deleteEmpty: '{!isCreate}',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -161,8 +161,8 @@ Ext.define('Proxmox.panel.SmtpEditPanel', {
|
|||||||
fieldLabel: gettext('Author'),
|
fieldLabel: gettext('Author'),
|
||||||
name: 'author',
|
name: 'author',
|
||||||
allowBlank: true,
|
allowBlank: true,
|
||||||
emptyText: gettext('Proxmox VE'),
|
|
||||||
cbind: {
|
cbind: {
|
||||||
|
emptyText: '{defaultMailAuthor}',
|
||||||
deleteEmpty: '{!isCreate}',
|
deleteEmpty: '{!isCreate}',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -45,6 +45,7 @@ Ext.define('Proxmox.window.EndpointEditBase', {
|
|||||||
isCreate: me.isCreate,
|
isCreate: me.isCreate,
|
||||||
baseUrl: me.baseUrl,
|
baseUrl: me.baseUrl,
|
||||||
type: me.type,
|
type: me.type,
|
||||||
|
defaultMailAuthor: endpointConfig.defaultMailAuthor,
|
||||||
}],
|
}],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user