acme: domain edit: allow setting the alias of DNS domains
Domains validated with the DNS challenge can have an alias, so that the challenge record is created on another domain, which the '_acme-challenge' record of the domain points to with a CNAME. But the alias could only be set on the CLI, as the edit window only kept an existing one in a hidden field. Show it as a text field for domains with the DNS challenge type, like the plugin. As a side effect, an existing alias is not kept anymore when switching a domain to the HTTP challenge type with separate domain entries, like it is done in Proxmox Mail Gateway, where it has no meaning. Signed-off-by: Michal Fox <me@dualfroz.com>
This commit is contained in:
1 parent
0471e06161
commit
9b1e7d66ce
1 file changed
+13
-7
@@ -142,16 +142,14 @@ Ext.define('Proxmox.window.ACMEDomainEdit', {
|
||||
change: function (cb, value) {
|
||||
let me = this;
|
||||
let view = me.up('pmxACMEDomainEdit');
|
||||
let pluginField = view.down('field[name=plugin]');
|
||||
pluginField.setDisabled(value !== 'dns');
|
||||
pluginField.setHidden(value !== 'dns');
|
||||
for (const name of ['plugin', 'alias']) {
|
||||
let field = view.down(`field[name=${name}]`);
|
||||
field.setDisabled(value !== 'dns');
|
||||
field.setHidden(value !== 'dns');
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
xtype: 'hidden',
|
||||
name: 'alias',
|
||||
},
|
||||
{
|
||||
xtype: 'pmxACMEPluginSelector',
|
||||
name: 'plugin',
|
||||
@@ -170,6 +168,14 @@ Ext.define('Proxmox.window.ACMEDomainEdit', {
|
||||
value: '',
|
||||
fieldLabel: gettext('Domain'),
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxtextfield',
|
||||
name: 'alias',
|
||||
disabled: true,
|
||||
hidden: true,
|
||||
fieldLabel: gettext('Alias'),
|
||||
emptyText: Proxmox.Utils.noneText,
|
||||
},
|
||||
{
|
||||
xtype: 'combobox',
|
||||
name: 'usage',
|
||||
|
||||
Reference in new issue
Block a user